Move complex_args templating to be with module_args

Keeps every action plugin from having to do the same thing.
This commit is contained in:
Daniel Hokka Zakrisson 2013-03-07 11:05:17 +01:00
commit 76f3351b02
4 changed files with 5 additions and 10 deletions

View file

@ -36,10 +36,8 @@ 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)
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")