mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00: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:
committed by
Brian Coca
parent
44bef1dc6b
commit
9fdd07fba8
@@ -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
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user