mgrote_users: fix filter (#161)
Some checks failed
ci/woodpecker/pr/gitleaks Pipeline failed
ci/woodpecker/pull_request_closed/gitleaks Pipeline failed
ci/woodpecker/push/gitleaks Pipeline was successful
ci/woodpecker/pr/ansible-lint unknown status
ci/woodpecker/pull_request_closed/ansible-lint unknown status
ci/woodpecker/push/ansible-lint Pipeline failed

Reviewed-on: #161
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2024-08-20 09:11:57 +02:00 committed by Michael Grote
parent 304eda8371
commit 812e75a196

View file

@ -1,7 +1,7 @@
--- ---
- name: set groups as list - name: set groups as list
ansible.builtin.set_fact: ansible.builtin.set_fact:
groups_as_list: "{{ (groups_as_list | default([]) + item.groups.split(',')) | map('trim') | list | sort | unique }}" groups_as_list: "{{ (((((groups_as_list | default([]) + item.groups.split(','))) | map('trim')) | list) | sort) | unique }}"
loop: '{{ users }}' loop: '{{ users }}'
when: item.groups is defined when: item.groups is defined