Remove shell module specialcases

Shell is implemented via the command module.  There was a special case
in mod_args to do that.  Make shell into an action plugin to handle that
instead.

Also move the special case for the command nanny into a command module
action plugin.  This is more appropriate as we then do not have to send
a parameter that is only for the command module to every single module.
This commit is contained in:
Toshio Kuratomi 2017-12-21 10:45:33 -08:00
parent 39800e1390
commit 235bdfb996
8 changed files with 125 additions and 103 deletions

View file

@ -165,7 +165,8 @@ def main():
executable=dict(),
creates=dict(type='path'),
removes=dict(type='path'),
warn=dict(type='bool'),
# The default for this really comes from the action plugin
warn=dict(type='bool', default=True),
stdin=dict(required=False),
)
)
@ -179,9 +180,6 @@ def main():
warn = module.params['warn']
stdin = module.params['stdin']
if warn is None:
warn = module._command_warn
if not shell and executable:
module.warn("As of Ansible 2.4, the parameter 'executable' is no longer supported with the 'command' module. Not using '%s'." % executable)
executable = None