diff --git a/tasks/main.yml b/tasks/main.yml index c9987de..206ad6f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ user: name: "{{ item.name }}" shell: "{{ item.shell | default('/usr/sbin/nologin') }}" - groups: "{{ item.secondary_groups | default('') }}" + groups: "{{ (item.secondary_groups | join(',')) | default('') }}" comment: "{{ item.comment | default('') }}" home: "{{ item.home }}" generate_ssh_key: yes @@ -34,7 +34,7 @@ user: name: "{{ item.name }}" shell: "{{ item.shell | default('/usr/sbin/nologin') }}" - groups: "{{ item.secondary_groups | default('') }}" + groups: "{{ (item.secondary_groups | join(',')) | default('') }}" comment: "{{ item.comment | default('') }}" uid: "{{ item.uid | default(omit) }}" home: "{{ item.home }}"