Skip to content

Commit

Permalink
Fix static determination for include_tasks
Browse files Browse the repository at this point in the history
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 ansible#31593
  • Loading branch information
jimi-c authored and abadger committed Oct 12, 2017
1 parent 0371d0d commit 3ef4f7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ansible/playbook/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down

0 comments on commit 3ef4f7e

Please sign in to comment.