From ff998b602291acf55bbda498ca0361383c440a48 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 17 Jun 2015 00:09:04 -0400 Subject: [PATCH] Make sure the templar is using the right vars when evaluating conditionals --- lib/ansible/playbook/conditional.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/playbook/conditional.py b/lib/ansible/playbook/conditional.py index 707233aaa0e..ff00a01de27 100644 --- a/lib/ansible/playbook/conditional.py +++ b/lib/ansible/playbook/conditional.py @@ -73,6 +73,9 @@ class Conditional: if conditional in all_vars and '-' not in unicode(all_vars[conditional]): conditional = all_vars[conditional] + # make sure the templar is using the variables specifed to this method + templar.set_available_variables(variables=all_vars) + conditional = templar.template(conditional) if not isinstance(conditional, basestring) or conditional == "": return conditional