Passing in complex_args throws ‘unsupported parameter for module’ errors

When using assemble only params (e.g. remote_src) the copy (and I’m
guessing file) modules throw an error that the param isn’t supported.
Simply removing the complex_args param fixes it for me, but I’m not sure
that’s the correct thing to do
This commit is contained in:
Andrew Smith 2013-11-28 10:55:35 +10:00
parent da44a7f0cb
commit 7b01c83159

View file

@ -92,8 +92,8 @@ class ActionModule(object):
if self.runner.noop_on_check(inject):
return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=src, before=dest_contents, after=resultant))
else:
res = self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject, complex_args=complex_args)
res.diff = dict(before=dest_contents, after=resultant)
res = self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject)
return res
else:
return self.runner._execute_module(conn, tmp, 'file', module_args, inject=inject, complex_args=complex_args)
return self.runner._execute_module(conn, tmp, 'file', module_args, inject=inject)