---
- name: restart smbd
become: yes
systemd:
name: smbd
enabled: yes
state: restarted
- name: set samba passwords
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