From 5760f0effbebe55e7150eb06e9a6b691a0e98455 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 12 Jan 2016 13:17:02 -0500 Subject: [PATCH] dont error out on new internal vars --- lib/ansible/module_utils/basic.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index ede8240330e..fb300bc42c4 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -514,9 +514,11 @@ class AnsibleModule(object): 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(): @@ -1141,6 +1143,12 @@ class AnsibleModule(object): 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)