Skip to content

Commit

Permalink
issue #109: do exactly what Ansible does
Browse files Browse the repository at this point in the history
Could it be that some empty dict magically gets populated from somewhere
invisible?
  • Loading branch information
dw committed Mar 7, 2018
1 parent ff151e5 commit d89b214
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ansible_mitogen/mixins.py
Expand Up @@ -259,9 +259,12 @@ def _execute_module(self, module_name=None, module_args=None, tmp=None,
helpers.run_module() or helpers.run_module_async() in the target
context.
"""
module_name = module_name or self._task.action
module_args = module_args or self._task.args
task_vars = task_vars or {}
if task_vars is None:
task_vars = {}
if module_name is None:
module_name = self._task.action
if module_args is None:
module_args = self._task.args

self._update_module_args(module_name, module_args, task_vars)
if wrap_async:
Expand Down

0 comments on commit d89b214

Please sign in to comment.