mg
f5dc006a84
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>
14 lines
431 B
YAML
14 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
|