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: Idaf2a72b1744d223d913991fda70af109a51dfa4
Related-Bug: https://github.com/ansible/ansible/issues/17687
This commit is contained in:
Jesse Pretorius 2016-09-22 15:59:47 +01:00
parent d11071f283
commit a1cb34b9b6
1 changed files with 4 additions and 4 deletions

View File

@ -14,9 +14,9 @@
# limitations under the License.
- include: rsyslog_client_install-apt.yml
when:
- ansible_pkg_mgr == 'apt'
static: no
when: ansible_pkg_mgr == 'apt'
- include: rsyslog_client_install-yum.yml
when:
- ansible_pkg_mgr == 'yum'
static: no
when: ansible_pkg_mgr == 'yum'