From 4fe403d5f3575248549f4e9380843c1bdbba8cc1 Mon Sep 17 00:00:00 2001 From: Bert Van Vreckem Date: Sun, 29 May 2016 09:50:49 +0200 Subject: [PATCH] Fixed #6, idempotence of adding users --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index d4c5e78..e6366ee 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -94,4 +94,6 @@ || (echo {{ item.password }}; echo {{ item.password }}) \ | smbpasswd -s -a {{ item.name }} with_items: "{{ samba_users }}" + register: create_user_output + changed_when: "'Added user' in create_user_output.stdout" tags: samba