Manage the NFS ACLs.

This commit is contained in:
Andrea Dell'Amico 2024-05-29 11:45:03 +02:00
parent 628adddb78
commit 436715fded
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 43 additions and 14 deletions

View File

@ -43,25 +43,54 @@
tags: [ 'users', 'users_acl' ]
- block:
- name: Set the ACLs on the users data dirs
tags: [ 'users_acl' ]
block:
- name: Set the read/write/access permissions on the users additional data dirs
acl: name={{ item.name }} entity={{ item.acl_group | default(common_users_group) }} etype=group permissions={{ item.aclperms | default('rwX') }} state=present recursive=yes
with_items: '{{ additional_data_directories }}'
ansible.posix.acl:
name: "{{ item.name }}"
entity: "{{ item.acl_group | default(common_users_group) }}"
etype: group
permissions: "{{ item.aclperms | default('rwX') }}"
state: "{{ item.acl_state | default('present') }}"
recursive: "{{ item.acl_recursive_set | default(true) }}"
use_nfsv4_acls: "{{ item.nfs4_acl | default(false) }}"
loop: '{{ additional_data_directories }}'
- name: Set the default read/write/access permissions on the users additional data dirs
acl: name={{ item.name }} entity={{ item.acl_group | default(common_users_group) }} etype=group permissions={{ item.aclperms | default('rwX') }} state=present default=yes recursive=yes
with_items: '{{ additional_data_directories }}'
ansible.posix.acl:
name: "{{ item.name }}"
entity: "{{ item.acl_group | default(common_users_group) }}"
etype: group
permissions: "{{ item.aclperms | default('rwX') }}"
state: "{{ item.acl_state | default('present') }}"
recursive: "{{ item.acl_recursive_set | default(true) }}"
use_nfsv4_acls: "{{ item.nfs4_acl | default(false) }}"
default: true
loop: '{{ additional_data_directories }}'
- name: Set the ACLs on the users data dirs
tags: [ 'users_acl' ]
- block:
block:
- name: Set the read/write/access permissions on the additional data dirs
acl: name={{ item.name }} entity={{ item.acl_group | default(common_users_group) }} etype=group permissions={{ item.aclperms | default('rwX') }} state=present recursive=yes
with_items: '{{ additional_data_directories_adjunct }}'
ansible.posix.acl:
name: "{{ item.name }}"
entity: "{{ item.acl_group | default(common_users_group) }}"
etype: group
permissions: "{{ item.aclperms | default('rwX') }}"
state: "{{ item.acl_state | default('present') }}"
recursive: "{{ item.acl_recursive_set | default(true) }}"
use_nfsv4_acls: "{{ item.nfs4_acl | default(false) }}"
loop: '{{ additional_data_directories_adjunct }}'
- name: Set the default read/write/access permissions on the additional data dirs
acl: name={{ item.name }} entity={{ item.acl_group | default(common_users_group) }} etype=group permissions={{ item.aclperms | default('rwX') }} state=present default=yes recursive=yes
with_items: '{{ additional_data_directories_adjunct }}'
tags: [ 'users_acl' ]
ansible.posix.acl:
name: "{{ item.name }}"
entity: "{{ item.acl_group | default(common_users_group) }}"
etype: group
permissions: "{{ item.aclperms | default('rwX') }}"
state: "{{ item.acl_state | default('present') }}"
recursive: "{{ item.acl_recursive_set | default(true) }}"
use_nfsv4_acls: "{{ item.nfs4_acl | default(false) }}"
default: true
loop: '{{ additional_data_directories_adjunct }}'