homeserver/roles/mgrote.fileserver_smb/handlers/main.yml
mg f5dc006a84 Update: fileserver_smb auf dict statt einzelne Variablen (#277)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#277
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2021-12-14 20:26:49 +01:00

15 lines
431 B
YAML

---
- name: restart smbd
become: yes
systemd:
name: smbd
enabled: yes
state: restarted
- name: set samba passwords
become: yes
shell: "printf '{{ item.password }}\n{{ item.password }}\n' | smbpasswd -a {{ item.name }}" # noqa 306 301 #pipefail: https://blog.christophersmart.com/2019/09/28/using-pipefail-with-shell-module-in-ansible/
with_items:
- "{{ smb_users }}"
no_log: True