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 }}
|
2015-08-27 17:14:27 +02:00
|
|
|
with_items: dnet_users_data_directories
|
2015-08-28 20:06:40 +02:00
|
|
|
when: item.create and not item.file
|
2015-08-27 17:14:27 +02:00
|
|
|
tags: [ 'dnet', 'users' ]
|
|
|
|
|
2015-08-28 20:06:40 +02:00
|
|
|
- name: Set the read/write/access permissions on the users dnet data dirs
|
2015-08-27 17:14:27 +02:00
|
|
|
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions=rwx state=present
|
|
|
|
with_items: dnet_users_data_directories
|
2015-08-28 20:06:40 +02:00
|
|
|
when: not item.file
|
2015-08-27 17:14:27 +02:00
|
|
|
tags: [ 'dnet', 'users' ]
|
|
|
|
|
2015-08-28 20:06:40 +02:00
|
|
|
- name: Set the default read/write/access permissions on the users dnet data dirs
|
2015-08-27 17:14:27 +02:00
|
|
|
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions=rwx state=present default=yes
|
|
|
|
with_items: dnet_users_data_directories
|
2015-08-28 20:06:40 +02:00
|
|
|
when: not item.file
|
|
|
|
tags: [ 'dnet', 'users' ]
|
|
|
|
|
|
|
|
- name: Set the read/write permissions on pre-existing files inside the users dnet data dirs
|
|
|
|
acl: name={{ item.name }} entity={{ dnet_group }} etype=group permissions=rw state=present
|
|
|
|
with_items: dnet_users_data_directories
|
|
|
|
when: item.file
|
2015-08-27 17:14:27 +02:00
|
|
|
tags: [ 'dnet', 'users' ]
|
|
|
|
|