issue #106: handle JSONARGS modules too.
This commit is contained in:
parent
971b366162
commit
a98a51a328
|
@ -272,7 +272,7 @@ _planners = [
|
|||
BinaryPlanner,
|
||||
# ReplacerPlanner,
|
||||
NewStylePlanner,
|
||||
# JsonArgsPlanner,
|
||||
JsonArgsPlanner,
|
||||
WantJsonPlanner,
|
||||
OldStylePlanner,
|
||||
]
|
||||
|
|
|
@ -342,15 +342,15 @@ class NewStyleRunner(ScriptRunner):
|
|||
}
|
||||
|
||||
|
||||
class JsonArgsFileRunner(ArgsFileRunner, ScriptRunner):
|
||||
class JsonArgsRunner(ScriptRunner):
|
||||
JSON_ARGS = '<<INCLUDE_ANSIBLE_MODULE_JSON_ARGS>>'
|
||||
|
||||
def _get_args_contents(self):
|
||||
return json.dump(self.args)
|
||||
return json.dumps(self.args)
|
||||
|
||||
def _rewrite_source(self, s):
|
||||
return (
|
||||
super(JsonArgsFileRunner, self)._rewrite_source(s)
|
||||
super(JsonArgsRunner, self)._rewrite_source(s)
|
||||
.replace(self.JSON_ARGS, self._get_args_contents())
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue