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: I82bb25b20a395c7d7738ef028b164d6de600e4c8
Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
Jesse Pretorius 2016-09-22 12:06:06 +01:00
parent 775e6126c1
commit 7905c7f89f
2 changed files with 3 additions and 0 deletions

View File

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

View File

@ -28,6 +28,7 @@
- include: haproxy_install.yml
- include: haproxy_ssl_configuration.yml
static: no
when: haproxy_ssl | bool
- include: haproxy_post_install.yml