From e16ddfd17ad9771230de41aa58e72ef46123443a Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 22 Sep 2016 12:11:39 +0100 Subject: [PATCH] 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: Ide7992e9f83f5462c92f1b15d53a5eed2e9d8e95 Related-Bug: https://github.com/ansible/ansible/issues/17687 --- tasks/memcached_install.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/memcached_install.yml b/tasks/memcached_install.yml index 59fe273..8d31040 100644 --- a/tasks/memcached_install.yml +++ b/tasks/memcached_install.yml @@ -14,9 +14,11 @@ # limitations under the License. - include: install-apt.yml + static: no when: - ansible_pkg_mgr == 'apt' - include: install-yum.yml + static: no when: - ansible_pkg_mgr == 'yum'