homeserver/roles/mgrote.fileserver_smb/handlers/main.yml
Michael Grote ccaaabc1be fix ansible-lint (#583)
Reviewed-on: #583
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2023-10-19 11:10:04 +02:00

15 lines
462 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 no-changed-when risky-shell-pipe
#pipefail: https://blog.christophersmart.com/2019/09/28/using-pipefail-with-shell-module-in-ansible/
with_items:
- "{{ smb_users }}"
no_log: True