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: Ia6db56fb94e2211ee3092849486b33c0427281d6 Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
parent
1e2d1c097c
commit
e30cc10311
@ -15,9 +15,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
- include: cinder_init_upstart.yml
|
||||
static: no
|
||||
when: pid1_name == "init"
|
||||
|
||||
- include: cinder_init_systemd.yml
|
||||
static: no
|
||||
when: pid1_name == "systemd"
|
||||
|
||||
- name: Load service
|
||||
|
@ -14,8 +14,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
- include: cinder_install_apt.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
static: no
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
|
@ -50,6 +50,7 @@
|
||||
- cinder-config
|
||||
|
||||
- include: cinder_db_setup.yml
|
||||
static: no
|
||||
when:
|
||||
- groups['cinder_all'] | length > 0
|
||||
- inventory_hostname == groups['cinder_all'][0]
|
||||
@ -57,6 +58,7 @@
|
||||
- cinder-install
|
||||
|
||||
- include: cinder_service_setup.yml
|
||||
static: no
|
||||
when:
|
||||
- groups['cinder_all'] | length > 0
|
||||
- inventory_hostname == groups['cinder_all'][0]
|
||||
@ -71,6 +73,7 @@
|
||||
meta: flush_handlers
|
||||
|
||||
- include: cinder_backends.yml
|
||||
static: no
|
||||
when:
|
||||
- groups['cinder_volume'] | length > 0
|
||||
- inventory_hostname in groups['cinder_volume'][0]
|
||||
@ -78,8 +81,9 @@
|
||||
- cinder-install
|
||||
|
||||
- include: cinder_lvm_config.yml
|
||||
when: >
|
||||
inventory_hostname in groups['cinder_volume']
|
||||
and cinder_backend_lvm_inuse
|
||||
static: no
|
||||
when:
|
||||
- inventory_hostname in groups['cinder_volume']
|
||||
- cinder_backend_lvm_inuse
|
||||
tags:
|
||||
- cinder-install
|
||||
|
Loading…
x
Reference in New Issue
Block a user