nfs-server/tasks/config.yaml
2026-04-07 16:26:05 +02:00

23 lines
588 B
YAML

---
# create directories
- name: "config - create directory"
ansible.builtin.file:
path: "{{ __shares['path'] }}"
state: "directory"
owner: "{{ __shares['owner'] | default('root') }}"
group: "{{ __shares['group'] | default('root') }}"
mode: "{{ __shares['mode'] | default('0770') }}"
loop: "{{ shares }}"
loop_control:
loop_var: "__shares"
# configure exports file
- name: "config - exports file"
ansible.builtin.template:
src: "templates/exports.j2"
dest: "/etc/exports"
owner: "root"
group: "root"
mode: "0644"
notify: "exportfs"