Allow including files through variables

$FILE{file} will be replaced with the contents of "file"
$PIPE{cat file} will be replaced with the output of "cat file"
This commit is contained in:
Daniel Hokka Zakrisson 2012-09-17 14:02:30 +02:00
parent b8c4bb9e6e
commit cc948f339c
9 changed files with 79 additions and 29 deletions

View file

@ -103,8 +103,8 @@ class Task(object):
# allow the user to list comma delimited tags
import_tags = import_tags.split(",")
self.name = utils.template(self.name, self.module_vars)
self.action = utils.template(self.action, self.module_vars)
self.name = utils.template(None, self.name, self.module_vars)
self.action = utils.template(None, self.action, self.module_vars)
# handle mutually incompatible options
if self.with_items is not None and self.first_available_file is not None: