diff --git a/lib/ansible/runner/action_plugins/copy.py b/lib/ansible/runner/action_plugins/copy.py index 60e29ff885..6ed9414a1b 100644 --- a/lib/ansible/runner/action_plugins/copy.py +++ b/lib/ansible/runner/action_plugins/copy.py @@ -38,6 +38,8 @@ class ActionModule(object): options.update(utils.parse_kv(module_args)) 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: result=dict(failed=True, msg="src and dest are required")