diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index a029d73afa..dd7b66af27 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -463,6 +463,10 @@ class Runner(object): else: metadata = '~/.ansible/setup' + # apply templating to source argument + inject = self.setup_cache.get(conn.host,{}) + source = utils.template(source, inject) + # first copy the source template over temppath = tmp + os.path.split(source)[-1] conn.put_file(utils.path_dwim(self.basedir, source), temppath)