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: I6029769c2fe0847a2d8fcbd62cdc41168fc89a60
Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
Jesse Pretorius 2016-09-22 15:36:42 +01:00
parent e1a0b49d8c
commit d721255ef3
3 changed files with 8 additions and 4 deletions

View File

@ -14,8 +14,8 @@
# limitations under the License.
- include: install-apt.yml
when:
- ansible_pkg_mgr == 'apt'
static: no
when: ansible_pkg_mgr == 'apt'
- name: Create developer mode constraint file
copy:

View File

@ -36,7 +36,7 @@
- rally-config
- include: database-setup.yml
when:
- inventory_hostname == groups[rally_role_project_group][0]
static: no
when: inventory_hostname == groups[rally_role_project_group][0]
tags:
- rally-install

View File

@ -6,6 +6,10 @@
src: https://git.openstack.org/openstack/openstack-ansible-pip_install
scm: git
version: master
- name: openstack_hosts
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
scm: git
version: master
- name: lxc_hosts
src: https://git.openstack.org/openstack/openstack-ansible-lxc_hosts
scm: git