diff --git a/lib/ansible/plugins/lookup/subelements.py b/lib/ansible/plugins/lookup/subelements.py index 0059a38bd23..9212d820dde 100644 --- a/lib/ansible/plugins/lookup/subelements.py +++ b/lib/ansible/plugins/lookup/subelements.py @@ -72,9 +72,9 @@ EXAMPLES = """ - "{{ users }}" - mysql.hosts - - name: list groups for user that have them, dont error if they don't + - name: list groups for users that have them, don't error if groups key is missing debug: var=item - with_list: "{{lookup('subelements', users, 'groups', 'skip_missing=True')}}" + loop: "{{lookup('subelements', users, 'groups', {'skip_missing': True})}}" """ RETURN = """