ansible-nas/permission_data.yml

21 lines
624 B
YAML
Raw Normal View History

---
2023-04-18 20:58:54 +00:00
- name: Permission Data
hosts: all
tasks:
2023-04-18 20:58:54 +00:00
- name: Warning!
ansible.builtin.debug:
msg: "This playbook will repermission ALL existing data in the shares defined in group_vars/all.yml to be owned by the ansible-nas user and group. If this is not what you want, exit now."
2023-04-18 20:58:54 +00:00
- name: 20s to change your mind...
ansible.builtin.pause:
seconds: 20
2023-04-18 20:58:54 +00:00
- name: "Permission share data"
ansible.builtin.file:
path: "{{ item.path }}"
owner: ansible-nas
group: ansible-nas
mode: "u=rwX,g=rwX,o=rX"
recurse: true
loop: "{{ samba_shares }}"