Skip to content

Commit

Permalink
Force an include to be a static task if no vars or loops are being us…
Browse files Browse the repository at this point in the history
…ed. (#16192)

Fixes #15735
  • Loading branch information
jctanner authored and jimi-c committed Jun 15, 2016
1 parent 43d1ea0 commit 73a3a58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/playbook/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
is_static = t.static
else:
is_static = C.DEFAULT_TASK_INCLUDES_STATIC or \
(use_handlers and C.DEFAULT_HANDLER_INCLUDES_STATIC)
(use_handlers and C.DEFAULT_HANDLER_INCLUDES_STATIC) or \
(not templar._contains_vars(t.args['_raw_params']) and not t.loop)

if is_static:
if t.loop is not None:
Expand Down

0 comments on commit 73a3a58

Please sign in to comment.