From e46ce1619f84b0fc128ae3181b6aeb1c9334d496 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Fri, 14 Sep 2018 12:04:52 -0600 Subject: [PATCH] add docstring for ansible.inventory.helpers.get_group_vars Document the expected parameter type and return type of get_group_vars(). --- lib/ansible/inventory/helpers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/inventory/helpers.py b/lib/ansible/inventory/helpers.py index 7ea9dea7c3..39c7221091 100644 --- a/lib/ansible/inventory/helpers.py +++ b/lib/ansible/inventory/helpers.py @@ -27,7 +27,12 @@ def sort_groups(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 = {} for group in sort_groups(groups): results = combine_vars(results, group.get_vars())