From ffbd4b5a2c205ca1227867f7dd2d81a2e99fcc2d Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 7 Mar 2013 00:35:40 -0500 Subject: [PATCH] Template options sooner on complex args copy --- lib/ansible/runner/action_plugins/copy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/action_plugins/copy.py b/lib/ansible/runner/action_plugins/copy.py index 6ed9414a1b..f905a24745 100644 --- a/lib/ansible/runner/action_plugins/copy.py +++ b/lib/ansible/runner/action_plugins/copy.py @@ -36,9 +36,9 @@ class ActionModule(object): if complex_args: options.update(complex_args) options.update(utils.parse_kv(module_args)) + options = utils.template(self.runner.basedir, options, inject) source = options.get('src', None) dest = options.get('dest', None) - options = utils.template(self.runner.basedir, options, inject) module_args = self.runner._complex_args_hack(options, '') if (source is None and not 'first_available_file' in inject) or dest is None: