|
|
|
|
@ -19,12 +19,11 @@
|
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.errors import AnsibleParserError, AnsibleError
|
|
|
|
|
from ansible.module_utils.six import iteritems, string_types
|
|
|
|
|
from ansible.module_utils._text import to_text
|
|
|
|
|
from ansible.plugins import module_loader
|
|
|
|
|
from ansible.parsing.splitter import parse_kv, split_args
|
|
|
|
|
from ansible.plugins import module_loader
|
|
|
|
|
from ansible.template import Templar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -96,7 +95,6 @@ class ModuleArgsParser:
|
|
|
|
|
assert isinstance(task_ds, dict)
|
|
|
|
|
self._task_ds = task_ds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _split_module_string(self, module_string):
|
|
|
|
|
'''
|
|
|
|
|
when module names are expressed like:
|
|
|
|
|
@ -111,7 +109,6 @@ class ModuleArgsParser:
|
|
|
|
|
else:
|
|
|
|
|
return (tokens[0], "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _handle_shell_weirdness(self, action, args):
|
|
|
|
|
'''
|
|
|
|
|
given an action name and an args dictionary, return the
|
|
|
|
|
@ -259,7 +256,6 @@ class ModuleArgsParser:
|
|
|
|
|
delegate_to = self._task_ds.get('delegate_to', None)
|
|
|
|
|
args = dict()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This is the standard YAML form for command-type modules. We grab
|
|
|
|
|
# the args and pass them in as additional arguments, which can/will
|
|
|
|
|
# be overwritten via dict updates from the other arg sources below
|
|
|
|
|
@ -272,7 +268,6 @@ class ModuleArgsParser:
|
|
|
|
|
thing = self._task_ds['action']
|
|
|
|
|
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# local_action
|
|
|
|
|
if 'local_action' in self._task_ds:
|
|
|
|
|
# local_action is similar but also implies a delegate_to
|
|
|
|
|
@ -294,7 +289,6 @@ class ModuleArgsParser:
|
|
|
|
|
thing = value
|
|
|
|
|
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if we didn't see any module in the task at all, it's not a task really
|
|
|
|
|
if action is None:
|
|
|
|
|
if 'ping' not in module_loader:
|
|
|
|
|
|