mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Reworking internal result flags and making sure include_vars hides vault data
Fixes #10194
This commit is contained in:
@@ -43,6 +43,6 @@ class ActionModule(ActionBase):
|
||||
result = dict(msg='here we are')
|
||||
|
||||
# force flag to make debug output module always verbose
|
||||
result['verbose_always'] = True
|
||||
result['_ansible_verbose_always'] = True
|
||||
|
||||
return result
|
||||
|
||||
@@ -39,12 +39,13 @@ class ActionModule(ActionBase):
|
||||
source = self._loader.path_dwim(source)
|
||||
|
||||
if os.path.exists(source):
|
||||
data = self._loader.load_from_file(source)
|
||||
(data, show_content) = self._loader._get_file_contents(source)
|
||||
data = self._loader.load(data, show_content)
|
||||
if data is None:
|
||||
data = {}
|
||||
if not isinstance(data, dict):
|
||||
raise AnsibleError("%s must be stored as a dictionary/hash" % source)
|
||||
return dict(ansible_facts=data)
|
||||
return dict(ansible_facts=data, _ansible_no_log=not show_content)
|
||||
else:
|
||||
return dict(failed=True, msg="Source file not found.", file=source)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user