Merge pull request #1 from SvenEeckeman/SvenEeckeman-patch-1

Fixed a problem that occurs when adding users with usernames that are part of already existing usernames (e.g. when alexander exists, you won't be able to add user alex).
This commit is contained in:
SvenEeckeman 2016-12-04 14:00:25 +01:00 committed by GitHub
commit ec8963a881

View File

@ -93,7 +93,7 @@
- name: Create Samba users if they don't exist yet - name: Create Samba users if they don't exist yet
shell: > shell: >
(pdbedit -L | grep {{ item.name }} 2>&1 > /dev/null) \ (pdbedit --user={{ item.name }} 2>&1 > /dev/null) \
|| (echo {{ item.password }}; echo {{ item.password }}) \ || (echo {{ item.password }}; echo {{ item.password }}) \
| smbpasswd -s -a {{ item.name }} | smbpasswd -s -a {{ item.name }}
with_items: "{{ samba_users }}" with_items: "{{ samba_users }}"