From 4fedb17e3828faa9c50db612ba1c18af4aa9259d Mon Sep 17 00:00:00 2001 From: Will Thames Date: Thu, 2 Aug 2012 16:11:40 +1000 Subject: [PATCH] Apply templating to module arguments in playbook Module arguments should have variable substitution applied Also, replacing task.action with the templated task.name seems wrong --- lib/ansible/playbook/task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index 1cdf450cde..8f769164e7 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -83,7 +83,8 @@ class Task(object): import_tags = import_tags.split(",") self.name = utils.template(self.name, self.module_vars) - self.action = utils.template(self.name, self.module_vars) + self.action = utils.template(self.action, self.module_vars) + self.module_args = utils.template(self.module_args, self.module_vars) # handle mutually incompatible options if self.with_items is not None and self.first_available_file is not None: