Skip to content

Commit

Permalink
Make the fileglob lookup return a list directly
Browse files Browse the repository at this point in the history
No need to pipe it to the split filter.
  • Loading branch information
enasca committed Apr 24, 2024
1 parent ce85f13 commit e4e1775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible/playbooks/usermgmt/create-users-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
tasks:
- name: Load users
ansible.builtin.include_tasks: tasks/load-user.yml
loop: "{{ lookup('fileglob', userglob) | split(',') }}"
loop: "{{ lookup('fileglob', userglob, wantlist=True) }}"
when: userglob is defined

- name: Load groups
ansible.builtin.include_tasks: tasks/load-group.yml
loop: "{{ lookup('fileglob', groupglob) | split(',') }}"
loop: "{{ lookup('fileglob', groupglob, wantlist=True) }}"
when: groupglob is defined

- hosts: managed_cluster
Expand Down

0 comments on commit e4e1775

Please sign in to comment.