homeserver/roles/mgrote.fileserver_smb/tasks/shares.yml
mg f5dc006a84 Update: fileserver_smb auf dict statt einzelne Variablen (#277)
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>
2021-12-14 20:26:49 +01:00

22 lines
500 B
YAML

---
- name: ensure smb share directories exist
become: yes
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: 0777
loop: "{{ smb_shares }}"
notify: set samba passwords
- name: template share configuration
become: yes
ansible.builtin.template:
src: smb.conf.j2
dest: /etc/samba/smb.conf
validate: 'testparm -s %s'
with_items:
- "{{ smb_shares }}"
notify:
- restart smbd
- set samba passwords