homeserver/roles/mgrote_fileserver_smb/handlers/main.yml
Michael Grote bc6f8fdc9e
All checks were successful
ansible-lint / gitleaks (push) Successful in 5s
ansible-lint / Ansible Lint (push) Successful in 1m0s
add no_log as global variable (#233)
Reviewed-on: #233
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-11-10 15:56:59 +01:00

15 lines
501 B
YAML

---
- name: restart smbd
become: true
ansible.builtin.systemd:
name: smbd
enabled: true
state: restarted
- name: set samba passwords
become: true
ansible.builtin.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: "{{ no_debug | default('true') }}"