mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
log on target based on nolog, not verbosity (#18570)
* log on target based on nolog, not verbosity fies #18569 * initialize module name removing verbosity exposed missing name at certain stages, initialize to file name and update later once module args are parsed
This commit is contained in:
@@ -672,6 +672,7 @@ class AnsibleModule(object):
|
|||||||
see library/* for examples
|
see library/* for examples
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
self._name = os.path.basename(__file__) #initialize name until we can parse from options
|
||||||
self.argument_spec = argument_spec
|
self.argument_spec = argument_spec
|
||||||
self.supports_check_mode = supports_check_mode
|
self.supports_check_mode = supports_check_mode
|
||||||
self.check_mode = False
|
self.check_mode = False
|
||||||
@@ -751,7 +752,7 @@ class AnsibleModule(object):
|
|||||||
|
|
||||||
self._set_defaults(pre=False)
|
self._set_defaults(pre=False)
|
||||||
|
|
||||||
if not self.no_log and self._verbosity >= 3:
|
if not self.no_log:
|
||||||
self._log_invocation()
|
self._log_invocation()
|
||||||
|
|
||||||
# finally, make sure we're in a sane working dir
|
# finally, make sure we're in a sane working dir
|
||||||
|
|||||||
Reference in New Issue
Block a user