aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorSean Mooney <sean.k.mooney@intel.com>2016-08-31 19:39:59 +0000
committerSean Mooney <sean.k.mooney@intel.com>2016-08-31 19:39:59 +0000
commit7f1084808b34cfc32683e4259f88e29fd24e53be (patch)
tree74029ad0a45e34bf8ca2b6b5e0227d2fa066a494 /ansible
parentb4c505a6c8da19be438cbf03e28a4d3f82099a11 (diff)
downloadkolla-7f1084808b34cfc32683e4259f88e29fd24e53be.tar.gz
kolla-7f1084808b34cfc32683e4259f88e29fd24e53be.zip
replace baremetal_nic with api_interface
- The baremetal_nic variable was used as part of kolla host playbook when generating the /etc/hosts file. Populating the /etc/hosts is done to ensure that rabbitmq can reach the other nodes in the rabbitmq cluster by hostname. - Before this change the baremetal_nic variable was used to determin which interface to read when mapping the hostname to an ip address. - This change removes baremetal_nic and uses api_interface instead as the hostname used by rabbitmq should always map to the api_interface ip. TrivialFix Closes-Bug: #1618381 Change-Id: I65fe3aad58ac34b001a1f4a38641addc9fa5a1d4
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/baremetal/defaults/main.yml2
-rw-r--r--ansible/roles/baremetal/tasks/append_to_etc_hosts.yml2
2 files changed, 1 insertions, 3 deletions
diff --git a/ansible/roles/baremetal/defaults/main.yml b/ansible/roles/baremetal/defaults/main.yml
index 5ffd34b4c..87cae0e4d 100644
--- a/ansible/roles/baremetal/defaults/main.yml
+++ b/ansible/roles/baremetal/defaults/main.yml
@@ -1,6 +1,4 @@
---
-baremetal_nic: "{{ api_interface | default('em1') }}"
-
docker_apt_url: "https://apt.dockerproject.org"
docker_apt_key_id: F76221572C52609D
diff --git a/ansible/roles/baremetal/tasks/append_to_etc_hosts.yml b/ansible/roles/baremetal/tasks/append_to_etc_hosts.yml
index b6eb60581..c577d2fe2 100644
--- a/ansible/roles/baremetal/tasks/append_to_etc_hosts.yml
+++ b/ansible/roles/baremetal/tasks/append_to_etc_hosts.yml
@@ -5,7 +5,7 @@
delegate_to: "{{ control_node }}"
- name: get real node ip
- shell: ip -4 addr show "{{ hostvars[control_node]['baremetal_nic'] }}" | grep -oP "(?<=inet )[\d\.]+(?=/)"
+ shell: ip -4 addr show "{{ hostvars[control_node]['api_interface'] }}" | grep -oP "(?<=inet )[\d\.]+(?=/)"
register: real_node_ip
delegate_to: "{{ control_node }}"