From 4c62ab3bc78eb1a7bd58f2f2d38e7b2ce9c468be Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 22 Oct 2017 23:24:10 +0000 Subject: [PATCH] don't fail when no groups are defined for user --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 149f1f5..2d12541 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,7 +20,7 @@ user: name: "{{ item }}" group: "{{ item }}" - groups: "{{ users[item].groups | join(',') }}" + groups: "{{ users[item].groups | default([]) | join(',') }}" uid: "{{ users[item].uid }}" home: "{{ users[item].home | default('/home/'+item) }}" shell: "{{ users[item].shell | default('/bin/bash') }}"