mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
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:
parent
39800e1390
commit
235bdfb996
8 changed files with 125 additions and 103 deletions
|
@ -812,12 +812,11 @@ class AnsibleModule(object):
|
|||
self._warnings = []
|
||||
self._deprecations = []
|
||||
self._clean = {}
|
||||
self._command_warn = True
|
||||
|
||||
self.aliases = {}
|
||||
self._legal_inputs = ['_ansible_check_mode', '_ansible_no_log', '_ansible_debug', '_ansible_diff', '_ansible_verbosity',
|
||||
'_ansible_selinux_special_fs', '_ansible_module_name', '_ansible_version', '_ansible_syslog_facility',
|
||||
'_ansible_socket', '_ansible_shell_executable', '_ansible_command_warnings']
|
||||
'_ansible_socket', '_ansible_shell_executable']
|
||||
self._options_context = list()
|
||||
|
||||
if add_file_common_args:
|
||||
|
@ -1630,9 +1629,6 @@ class AnsibleModule(object):
|
|||
elif k == '_ansible_shell_executable' and v:
|
||||
self._shell = v
|
||||
|
||||
elif k == '_ansible_command_warnings' and v:
|
||||
self._command_warn = v
|
||||
|
||||
elif check_invalid_arguments and k not in legal_inputs:
|
||||
unsupported_parameters.add(k)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue