diff --git a/ansible_mitogen/planner.py b/ansible_mitogen/planner.py index ae632ab9..e7b553c6 100644 --- a/ansible_mitogen/planner.py +++ b/ansible_mitogen/planner.py @@ -272,7 +272,7 @@ _planners = [ BinaryPlanner, # ReplacerPlanner, NewStylePlanner, - # JsonArgsPlanner, + JsonArgsPlanner, WantJsonPlanner, OldStylePlanner, ] diff --git a/ansible_mitogen/runner.py b/ansible_mitogen/runner.py index d6b3d48d..a6b77977 100644 --- a/ansible_mitogen/runner.py +++ b/ansible_mitogen/runner.py @@ -342,15 +342,15 @@ class NewStyleRunner(ScriptRunner): } -class JsonArgsFileRunner(ArgsFileRunner, ScriptRunner): +class JsonArgsRunner(ScriptRunner): 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()) )