mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
fix command warnings, add action warnings (#34060)
* fix command warnings, add action warnings
This commit is contained in:
parent
94d952f94b
commit
a0c171ce1b
5 changed files with 24 additions and 4 deletions
|
@ -812,11 +812,12 @@ 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_socket', '_ansible_shell_executable', '_ansible_command_warnings']
|
||||
self._options_context = list()
|
||||
|
||||
if add_file_common_args:
|
||||
|
@ -1629,6 +1630,9 @@ 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