Skip to content

Commit

Permalink
Add support to fetch all user data with agnosticd_user_data (#7288)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkupferer authored Nov 2, 2023
1 parent f6ee1d6 commit 97fa477
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ansible/lookup_plugins/agnosticd_user_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def run(self, terms, user=None, **kwargs):
user_data = user_data.get('users', {}).get(user)

for term in terms:
ret.append(user_data.get(term) if user_data else None)
if term == '*':
ret.append(user_data)
else:
ret.append(user_data.get(term) if user_data else None)

return ret

0 comments on commit 97fa477

Please sign in to comment.