From e4e1775d4fd9c83413f6a78fb92b99635cb2fa26 Mon Sep 17 00:00:00 2001 From: Enrico Nasca Date: Wed, 24 Apr 2024 08:31:55 +0000 Subject: [PATCH] Make the fileglob lookup return a list directly No need to pipe it to the split filter. --- ansible/playbooks/usermgmt/create-users-groups.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/playbooks/usermgmt/create-users-groups.yml b/ansible/playbooks/usermgmt/create-users-groups.yml index 7aae2203..79a51649 100644 --- a/ansible/playbooks/usermgmt/create-users-groups.yml +++ b/ansible/playbooks/usermgmt/create-users-groups.yml @@ -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