Force Ansible to use dynamic includes
Ansible 2.1.1 introduces a regression in the way conditional includes are handled which results in every task in the included file being evaluated even if the condition for the include is not met. This extends the run time significantly for a deployment. This patch forces all conditional includes to be dynamic. Change-Id: I508c83ee2ba774e87105c72a10be899bdc2a71b9 Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
- include: magnum_install_apt.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
static: no
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
|
@@ -15,9 +15,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
- include: magnum_init_upstart.yml
|
||||
static: no
|
||||
when: pid1_name == "init"
|
||||
|
||||
- include: magnum_init_systemd.yml
|
||||
static: no
|
||||
when: pid1_name == "systemd"
|
||||
|
||||
- name: Load service
|
||||
|
@@ -52,14 +52,14 @@
|
||||
- magnum-install
|
||||
|
||||
- include: database-setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['magnum_all'][0]
|
||||
static: no
|
||||
when: inventory_hostname == groups['magnum_all'][0]
|
||||
tags:
|
||||
- magnum-install
|
||||
|
||||
- include: service-setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['magnum_all'][0]
|
||||
static: no
|
||||
when: inventory_hostname == groups['magnum_all'][0]
|
||||
tags:
|
||||
- magnum-install
|
||||
|
||||
|
Reference in New Issue
Block a user