Skip to content

Commit

Permalink
dont error out on new internal vars
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoca committed Jan 12, 2016
1 parent 06fa841 commit 5760f0e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/ansible/module_utils/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,11 @@ def __init__(self, argument_spec, bypass_checks=False, no_log=False,
self.no_log = no_log
self.cleanup_files = []
self._debug = False
self._diff = False
self._verbosity = 0

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:
for k, v in FILE_COMMON_ARGUMENTS.items():
Expand Down Expand Up @@ -1141,6 +1143,12 @@ def _check_arguments(self, check_invalid_arguments):
elif k == '_ansible_debug':
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:
self.fail_json(msg="unsupported parameter for module: %s" % k)

Expand Down

0 comments on commit 5760f0e

Please sign in to comment.