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: Ic9d45aea1b930ef7ffee00628cf2993ad1b79e14
Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
Jesse Pretorius 2016-09-22 12:09:51 +01:00
parent db485a4382
commit c4f3351a9c
2 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,7 @@
- always
- include: container_create.yml
static: no
when:
- physical_host is defined
- inventory_hostname is defined

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