2015-08-27 17:14:27 +02:00
|
|
|
---
|
|
|
|
- name: Create the users dnet data dirs
|
2015-10-07 17:01:22 +02:00
|
|
|
file: name={{ item.name }} state=directory owner={{ item.owner }} group={{ item.group }} mode={{ item.perms }}
|
2016-06-30 11:30:35 +02:00
|
|
|
with_items: '{{ dnet_users_data_directories }}'
|
2015-08-28 20:06:40 +02:00
|
|
|
when: item.create and not item.file
|
2016-01-14 19:24:06 +01:00
|
|
|
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
|
2015-08-27 17:14:27 +02:00
|
|
|
|
2015-08-28 20:06:40 +02:00
|
|
|
- name: Set the read/write/access permissions on the users dnet data dirs
|
2016-08-11 10:46:13 +02:00
|
|
|
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions={{ item.aclperms | default ('rwx') }} state=present
|
2016-06-30 11:30:35 +02:00
|
|
|
with_items: '{{ dnet_users_data_directories }}'
|
2015-08-28 20:06:40 +02:00
|
|
|
when: not item.file
|
2016-01-14 19:24:06 +01:00
|
|
|
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
|
2015-08-27 17:14:27 +02:00
|
|
|
|
2015-08-28 20:06:40 +02:00
|
|
|
- name: Set the default read/write/access permissions on the users dnet data dirs
|
2016-08-11 10:46:13 +02:00
|
|
|
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions={{ item.aclperms | default ('rwx') }} state=present default=yes
|
2016-06-30 11:30:35 +02:00
|
|
|
with_items: '{{ dnet_users_data_directories }}'
|
2015-08-28 20:06:40 +02:00
|
|
|
when: not item.file
|
2016-01-14 19:24:06 +01:00
|
|
|
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
|
2015-08-28 20:06:40 +02:00
|
|
|
|
|
|
|
- name: Set the read/write permissions on pre-existing files inside the users dnet data dirs
|
2016-08-11 10:46:13 +02:00
|
|
|
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions={{ item.aclperms | default ('rw') }} state=present
|
2016-06-30 11:30:35 +02:00
|
|
|
with_items: '{{ dnet_users_data_directories }}'
|
2015-08-28 20:06:40 +02:00
|
|
|
when: item.file
|
2016-01-14 19:24:06 +01:00
|
|
|
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
|
2015-08-27 17:14:27 +02:00
|
|
|
|