Michael Grote
7a24089031
Reviewed-on: #584 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
24 lines
515 B
YAML
24 lines
515 B
YAML
---
|
|
- name: ensure smb share directories exist
|
|
become: true
|
|
ansible.builtin.file:
|
|
path: "{{ item.path }}"
|
|
state: directory
|
|
mode: "0777"
|
|
loop: "{{ smb_shares }}"
|
|
notify: set samba passwords
|
|
|
|
- name: template share configuration
|
|
become: true
|
|
ansible.builtin.template:
|
|
src: smb.conf.j2
|
|
dest: /etc/samba/smb.conf
|
|
validate: 'testparm -s %s'
|
|
mode: "0644"
|
|
owner: root
|
|
group: root
|
|
with_items:
|
|
- "{{ smb_shares }}"
|
|
notify:
|
|
- restart smbd
|
|
- set samba passwords
|