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: I18d8c2119e00aeec3c53cb7e39c8cf09cf5135f8
Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
Jesse Pretorius 2016-09-22 11:56:11 +01:00
parent 73595132cb
commit 74ac0dc33e
4 changed files with 10 additions and 0 deletions

View File

@ -14,12 +14,14 @@
# limitations under the License.
- include: galera_install_apt.yml
static: no
when:
- ansible_pkg_mgr == 'apt'
tags:
- install-apt
- include: galera_install_yum.yml
static: no
when:
- ansible_pkg_mgr == 'yum'
tags:

View File

@ -127,5 +127,6 @@
- galera-config
- include: galera_upgrade_post.yml
static: no
when:
- galera_upgrade | bool

View File

@ -14,17 +14,20 @@
# limitations under the License.
- include: galera_upgrade_check_apt.yml
static: no
when:
- ansible_pkg_mgr == 'apt'
tags:
- install-apt
- include: galera_upgrade_check_yum.yml
static: no
when:
- ansible_pkg_mgr == 'yum'
tags:
- install-apt
- include: galera_upgrade_pre.yml
static: no
when:
- galera_upgrade | bool

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