diff options
author | James Cammarata <jimi@sngx.net> | 2017-10-11 15:02:58 -0500 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-10-11 17:31:13 -0700 |
commit | 0aa1442c919da7894311d4a5acb4d6e26102ce3c (patch) | |
tree | dea90a2ccca3e32b2e558745811532e283618267 /lib/ansible | |
parent | 723beb58d1885966ec747a6059b2f36cabd6f1a3 (diff) | |
download | ansible-0aa1442c919da7894311d4a5acb4d6e26102ce3c.tar.gz |
Fix static determination for include_tasks
An incorrect removal of a conditional resulted in include_tasks falling
through to the old static detection mechanism incorrectly. This restores
the previous conditional check.
Fixes #31593
(cherry picked from commit 3ef4f7e8477621d48cb7688568c216012dda1a2d)
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/playbook/helpers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/playbook/helpers.py b/lib/ansible/playbook/helpers.py index e8fd60b209..50355674df 100644 --- a/lib/ansible/playbook/helpers.py +++ b/lib/ansible/playbook/helpers.py @@ -133,8 +133,9 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h # check to see if this include is dynamic or static: # 1. the user has set the 'static' option to false or true # 2. one of the appropriate config options was set - is_static = False - if 'import_tasks' in task_ds: + if 'include_tasks' in task_ds: + is_static = False + elif 'import_tasks' in task_ds: is_static = True elif t.static is not None: display.deprecated("The use of 'static' has been deprecated. " |