2021-04-09 23:29:03 +02:00
|
|
|
---
|
2021-12-14 20:26:49 +01:00
|
|
|
- name: restart smbd
|
2020-08-18 11:57:53 +02:00
|
|
|
become: yes
|
|
|
|
systemd:
|
|
|
|
name: smbd
|
|
|
|
enabled: yes
|
|
|
|
state: restarted
|
|
|
|
|
2021-12-14 20:26:49 +01:00
|
|
|
- name: set samba passwords
|
2020-08-18 11:57:53 +02:00
|
|
|
become: yes
|
2023-10-19 11:10:04 +02:00
|
|
|
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/
|
2020-08-18 11:57:53 +02:00
|
|
|
with_items:
|
2023-10-19 11:10:04 +02:00
|
|
|
- "{{ smb_users }}"
|
2020-08-18 11:57:53 +02:00
|
|
|
no_log: True
|