mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixed fact gathering verbosity hint
also removed redundant cleanup in normal plugin as module execution already removes _ansible_* from results fixes #20378
This commit is contained in:
parent
9d26d8b605
commit
221771c0c9
2 changed files with 4 additions and 12 deletions
|
@ -3915,9 +3915,6 @@ def get_all_facts(module):
|
||||||
if module.params['filter'] == '*' or fnmatch.fnmatch(k, module.params['filter']):
|
if module.params['filter'] == '*' or fnmatch.fnmatch(k, module.params['filter']):
|
||||||
setup_result['ansible_facts'][k] = v
|
setup_result['ansible_facts'][k] = v
|
||||||
|
|
||||||
# hack to keep --verbose from showing all the setup module results
|
|
||||||
setup_result['_ansible_verbose_override'] = True
|
|
||||||
|
|
||||||
return setup_result
|
return setup_result
|
||||||
|
|
||||||
# Allowed fact subset for gather_subset options and what classes they use
|
# Allowed fact subset for gather_subset options and what classes they use
|
||||||
|
|
|
@ -31,14 +31,9 @@ class ActionModule(ActionBase):
|
||||||
# remove as modules might hide due to nolog
|
# remove as modules might hide due to nolog
|
||||||
del results['invocation']['module_args']
|
del results['invocation']['module_args']
|
||||||
results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars))
|
results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars))
|
||||||
# Remove special fields from the result, which can only be set
|
|
||||||
# internally by the executor engine. We do this only here in
|
# hack to keep --verbose from showing all the setup module results
|
||||||
# the 'normal' action, as other action plugins may set this.
|
if self._task.action == 'setup':
|
||||||
#
|
results['_ansible_verbose_override'] = True
|
||||||
# We don't want modules to determine that running the module fires
|
|
||||||
# notify handlers. That's for the playbook to decide.
|
|
||||||
for field in ('_ansible_notify',):
|
|
||||||
if field in results:
|
|
||||||
results.pop(field)
|
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in a new issue