mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
dont error out on new internal vars
This commit is contained in:
parent
06fa841516
commit
5760f0effb
1 changed files with 9 additions and 1 deletions
|
@ -514,9 +514,11 @@ class AnsibleModule(object):
|
||||||
self.no_log = no_log
|
self.no_log = no_log
|
||||||
self.cleanup_files = []
|
self.cleanup_files = []
|
||||||
self._debug = False
|
self._debug = False
|
||||||
|
self._diff = False
|
||||||
|
self._verbosity = 0
|
||||||
|
|
||||||
self.aliases = {}
|
self.aliases = {}
|
||||||
self._legal_inputs = ['_ansible_check_mode', '_ansible_no_log', '_ansible_debug']
|
self._legal_inputs = ['_ansible_check_mode', '_ansible_no_log', '_ansible_debug', '_ansible_diff', '_ansible_verbosity']
|
||||||
|
|
||||||
if add_file_common_args:
|
if add_file_common_args:
|
||||||
for k, v in FILE_COMMON_ARGUMENTS.items():
|
for k, v in FILE_COMMON_ARGUMENTS.items():
|
||||||
|
@ -1141,6 +1143,12 @@ class AnsibleModule(object):
|
||||||
elif k == '_ansible_debug':
|
elif k == '_ansible_debug':
|
||||||
self._debug = self.boolean(v)
|
self._debug = self.boolean(v)
|
||||||
|
|
||||||
|
elif k == '_ansible_diff':
|
||||||
|
self._diff = self.boolean(v)
|
||||||
|
|
||||||
|
elif k == '_ansible_verbosity':
|
||||||
|
self._verbosity = v
|
||||||
|
|
||||||
elif check_invalid_arguments and k not in self._legal_inputs:
|
elif check_invalid_arguments and k not in self._legal_inputs:
|
||||||
self.fail_json(msg="unsupported parameter for module: %s" % k)
|
self.fail_json(msg="unsupported parameter for module: %s" % k)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue