Skip to content

Commit

Permalink
remove puppet entry from /etc/hosts before rabbitmq hosts and
Browse files Browse the repository at this point in the history
add it after rabbitmq hosts are added.
Closes-Bug: #1732860

Change-Id: I40a9339af1f2d4f95663f3cb23f8e8d960e7f67c
  • Loading branch information
kamleshp committed Nov 25, 2017
1 parent 5374117 commit 751925e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions playbooks/roles/node/tasks/controller.yml
Expand Up @@ -3,11 +3,17 @@
debug:
msg: "controller_started"

- name: remove puppet entry from /etc/hosts for vcenter orchestrator
shell: "sed -i '/puppet/d' /etc/hosts"

- name: set /etc/hosts entry with their conrol-data IP for rabbitmq to work
lineinfile: dest=/etc/hosts line="{{ item.key + ' ' + item.value }}"
with_dict: "{{ controller_ip_hostname_dict }}"
when: controller_ip_hostname_dict

- name: Add puppet entry back in the the /etc/hosts
lineinfile: dest=/etc/hosts line="{{ ansible_srvr_ip + ' puppet' }}"

- name: Copy contrail controller image
copy:
src: "{{ docker_image_load_path }}/{{ contrail_controller_image_archive }}"
Expand Down

0 comments on commit 751925e

Please sign in to comment.