ansible-roles/library/roles/dnet_user_services_perms/tasks/dnet-users-data-dirs.yml

18 lines
970 B
YAML

---
- name: Create the users dnet data dirs
file: name={{ item.name }} state=directory owner={{ item.owner }} group={{ item.group }} mode={{ item.perms }}
with_items: '{{ dnet_users_data_directories | default([]) }}'
when: item.create and not item.file
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
- name: Set the read/write/access permissions on the users dnet data dirs
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions={{ item.aclperms | default ('rwX') }} state=present recursive=yes
with_items: '{{ dnet_users_data_directories | default([]) }}'
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
- name: Set the default read/write/access permissions on the users dnet data dirs
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions={{ item.aclperms | default ('rwX') }} state=present default=yes recursive=yes
with_items: '{{ dnet_users_data_directories | default([]) }}'
tags: [ 'dnet', 'users', 'dnet_u_acl' ]