mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add docstring for ansible.inventory.helpers.get_group_vars
Document the expected parameter type and return type of get_group_vars().
This commit is contained in:
parent
5adcaf4538
commit
e46ce1619f
1 changed files with 5 additions and 0 deletions
|
@ -27,7 +27,12 @@ def sort_groups(groups):
|
||||||
|
|
||||||
|
|
||||||
def get_group_vars(groups):
|
def get_group_vars(groups):
|
||||||
|
"""
|
||||||
|
Combine all the group vars from a list of inventory groups.
|
||||||
|
|
||||||
|
:param groups: list of ansible.inventory.group.Group objects
|
||||||
|
:rtype: dict
|
||||||
|
"""
|
||||||
results = {}
|
results = {}
|
||||||
for group in sort_groups(groups):
|
for group in sort_groups(groups):
|
||||||
results = combine_vars(results, group.get_vars())
|
results = combine_vars(results, group.get_vars())
|
||||||
|
|
Loading…
Reference in a new issue