From 02e52c319c921222fb558d5634ebddef17e0c0c0 Mon Sep 17 00:00:00 2001 From: jctanner Date: Wed, 8 Jun 2016 19:23:48 -0400 Subject: [PATCH] Force an include to be a static task if no vars or loops are being used. (#16192) Fixes #15735 --- lib/ansible/playbook/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/helpers.py b/lib/ansible/playbook/helpers.py index 9605c5f0c4a..4d14076643d 100644 --- a/lib/ansible/playbook/helpers.py +++ b/lib/ansible/playbook/helpers.py @@ -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: