diff --git a/conf/templates/ansible_installer/openstack_juno/hosts/HA-ansible-multinodes.tmpl b/conf/templates/ansible_installer/openstack_juno/hosts/HA-ansible-multinodes.tmpl index af384d45..9d628b5e 100644 --- a/conf/templates/ansible_installer/openstack_juno/hosts/HA-ansible-multinodes.tmpl +++ b/conf/templates/ansible_installer/openstack_juno/hosts/HA-ansible-multinodes.tmpl @@ -1,3 +1,12 @@ +#set ip_settings={} +#for k,v in $getVar('ip_settings', {}).items() +#set host_ip_settings={} +#for intf in v +#set $host_ip_settings[$intf["alias"]]=intf +#end for +#set $ip_settings[$k]=$host_ip_settings +#end for + # localhost 127.0.0.1 localhost #set controllers = $getVar('controller', []) @@ -10,13 +19,13 @@ #end if # controller #for worker in $controllers - #set worker_ip = $worker.install.ip #set worker_hostname = $worker.hostname + #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for # compute #for worker in $computes - #set worker_ip = $worker.install.ip #set worker_hostname = $worker.hostname + #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for diff --git a/conf/templates/ansible_installer/openstack_juno/vars/HA-ansible-multinodes.tmpl b/conf/templates/ansible_installer/openstack_juno/vars/HA-ansible-multinodes.tmpl index 132add4b..d41eca1b 100644 --- a/conf/templates/ansible_installer/openstack_juno/vars/HA-ansible-multinodes.tmpl +++ b/conf/templates/ansible_installer/openstack_juno/vars/HA-ansible-multinodes.tmpl @@ -37,6 +37,7 @@ deploy_type: $getVar('deploy_type', 'virtual') public_cidr: $computers[0]['install']['subnet'] storage_cidr: "{{ ip_settings[inventory_hostname]['storage']['cidr'] }}" +mgmt_cidr: "{{ ip_settings[inventory_hostname]['mgmt']['cidr'] }}" public_net_info: "{{ network_cfg.public_net_info }}" host_ip_settings: "{{ ip_settings[inventory_hostname] }}" diff --git a/conf/templates/ansible_installer/openstack_kilo/hosts/HA-ansible-multinodes.tmpl b/conf/templates/ansible_installer/openstack_kilo/hosts/HA-ansible-multinodes.tmpl index af384d45..9d628b5e 100644 --- a/conf/templates/ansible_installer/openstack_kilo/hosts/HA-ansible-multinodes.tmpl +++ b/conf/templates/ansible_installer/openstack_kilo/hosts/HA-ansible-multinodes.tmpl @@ -1,3 +1,12 @@ +#set ip_settings={} +#for k,v in $getVar('ip_settings', {}).items() +#set host_ip_settings={} +#for intf in v +#set $host_ip_settings[$intf["alias"]]=intf +#end for +#set $ip_settings[$k]=$host_ip_settings +#end for + # localhost 127.0.0.1 localhost #set controllers = $getVar('controller', []) @@ -10,13 +19,13 @@ #end if # controller #for worker in $controllers - #set worker_ip = $worker.install.ip #set worker_hostname = $worker.hostname + #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for # compute #for worker in $computes - #set worker_ip = $worker.install.ip #set worker_hostname = $worker.hostname + #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for diff --git a/conf/templates/ansible_installer/openstack_kilo/vars/HA-ansible-multinodes.tmpl b/conf/templates/ansible_installer/openstack_kilo/vars/HA-ansible-multinodes.tmpl index 132add4b..d41eca1b 100644 --- a/conf/templates/ansible_installer/openstack_kilo/vars/HA-ansible-multinodes.tmpl +++ b/conf/templates/ansible_installer/openstack_kilo/vars/HA-ansible-multinodes.tmpl @@ -37,6 +37,7 @@ deploy_type: $getVar('deploy_type', 'virtual') public_cidr: $computers[0]['install']['subnet'] storage_cidr: "{{ ip_settings[inventory_hostname]['storage']['cidr'] }}" +mgmt_cidr: "{{ ip_settings[inventory_hostname]['mgmt']['cidr'] }}" public_net_info: "{{ network_cfg.public_net_info }}" host_ip_settings: "{{ ip_settings[inventory_hostname] }}" diff --git a/conf/templates/ansible_installer/openstack_liberty/hosts/HA-ansible-multinodes.tmpl b/conf/templates/ansible_installer/openstack_liberty/hosts/HA-ansible-multinodes.tmpl index af384d45..9d628b5e 100644 --- a/conf/templates/ansible_installer/openstack_liberty/hosts/HA-ansible-multinodes.tmpl +++ b/conf/templates/ansible_installer/openstack_liberty/hosts/HA-ansible-multinodes.tmpl @@ -1,3 +1,12 @@ +#set ip_settings={} +#for k,v in $getVar('ip_settings', {}).items() +#set host_ip_settings={} +#for intf in v +#set $host_ip_settings[$intf["alias"]]=intf +#end for +#set $ip_settings[$k]=$host_ip_settings +#end for + # localhost 127.0.0.1 localhost #set controllers = $getVar('controller', []) @@ -10,13 +19,13 @@ #end if # controller #for worker in $controllers - #set worker_ip = $worker.install.ip #set worker_hostname = $worker.hostname + #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for # compute #for worker in $computes - #set worker_ip = $worker.install.ip #set worker_hostname = $worker.hostname + #set worker_ip = $ip_settings[$worker_hostname].mgmt.ip $worker_ip $worker_hostname #end for diff --git a/conf/templates/ansible_installer/openstack_liberty/vars/HA-ansible-multinodes.tmpl b/conf/templates/ansible_installer/openstack_liberty/vars/HA-ansible-multinodes.tmpl index e85ca3c1..d41eca1b 100644 --- a/conf/templates/ansible_installer/openstack_liberty/vars/HA-ansible-multinodes.tmpl +++ b/conf/templates/ansible_installer/openstack_liberty/vars/HA-ansible-multinodes.tmpl @@ -37,6 +37,8 @@ deploy_type: $getVar('deploy_type', 'virtual') public_cidr: $computers[0]['install']['subnet'] storage_cidr: "{{ ip_settings[inventory_hostname]['storage']['cidr'] }}" +mgmt_cidr: "{{ ip_settings[inventory_hostname]['mgmt']['cidr'] }}" + public_net_info: "{{ network_cfg.public_net_info }}" host_ip_settings: "{{ ip_settings[inventory_hostname] }}"