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
This commit is contained in:
Jesse Pretorius 2016-09-22 12:11:39 +01:00
parent 6e4b41c97a
commit e16ddfd17a

View File

@ -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'