bootstrap-servers is not working with --limit flag
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Fix Released
|
Medium
|
Unassigned | ||
Ocata |
Triaged
|
Medium
|
Unassigned | ||
Pike |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When using bootstrap-servers (ansible/
--limit flag the run fails.
This is due to the fact that only the facts of the subset of hosts
are gathered but the "Generate /etc/hosts for all of the nodes" task
in "ansible/
ansible_
The proposed fix is to add the following to ansible/
- name: Gather facts for all hosts
hosts: all
serial: '{{ serial|default("0") }}'
gather_facts: false
tasks:
- setup:
tags: always
- name: Gather facts for all hosts (if using --limit)
hosts: all
serial: '{{ serial|default("0") }}'
gather_facts: false
tasks:
- setup:
delegate_
delegate_to: "{{ item }}"
with_items: "{{ groups['all'] }}"
when:
- (ansible_play_batch | length) != (groups['all'] | length)
description: | updated |
Reviewed: https:/ /review. openstack. org/498799 /git.openstack. org/cgit/ openstack/ kolla-ansible/ commit/ ?id=c24afe6d683 9786a7624c28fb3 c180716d1b2cb1
Committed: https:/
Submitter: Jenkins
Branch: master
commit c24afe6d6839786 a7624c28fb3c180 716d1b2cb1
Author: Soeren Becker <email address hidden>
Date: Tue Aug 29 14:49:48 2017 +0200
Enable use of --limit when using bootstrap-servers
The ansible/ kolla-host. yml playbook failed when called with a --limit
flag.
This was due to the fact that only the facts of the subset of hosts <IFACE> .ipv4.address variable of all hosts.
were gathered but the "Generate /etc/hosts for all of the nodes" task
is using the ansible_
The code for this fix is copied from the site.yml playbook
where it was used for the same reason.
Change-Id: I7e70caf750506a d8ab36ec024bd96 47dd733fbd0
Closes-Bug: #1713725