mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Provide the list of files that were included by include_vars
include_vars will now also return a key 'ansible_included_var_files' which contains the list of files that were successfully loaded. This is useful information and, amongst other things, a way for users to know exactly what files were included when debugging their playbooks. This also allows us to improve the integration tests around include_vars.
This commit is contained in:
parent
44bef1dc6b
commit
9fdd07fba8
3 changed files with 40 additions and 7 deletions
|
@ -120,3 +120,17 @@ EXAMPLES = """
|
|||
ignore_files: 'bastion.yml'
|
||||
extensions: ['yml']
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
ansible_facts:
|
||||
description: Variables that were included and their values
|
||||
returned: success
|
||||
type: dict
|
||||
sample: {'variable': 'value'}
|
||||
ansible_included_var_files:
|
||||
description: A list of files that were successfully included
|
||||
returned: success
|
||||
type: list
|
||||
sample: [ '/path/to/file.yml', '/path/to/file.json' ]
|
||||
version_added: 2.4
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue