forked from ISTI-ansible-roles/ansible-roles
library/roles/dnet_user_services_perms: Add defaults where they were missing.
This commit is contained in:
parent
7a2e74177c
commit
4859f7a7a8
|
@ -2,7 +2,5 @@
|
|||
# Ignore errors because it fails if the user is already present and used to run a service.
|
||||
- name: Create users needed to operate services other than the dnet ones
|
||||
user: name={{ item.user }} comment="{{ item.user }}" home={{ item.home }} createhome={{ item.createhome }} shell={{ item.shell }}
|
||||
with_items: '{{ dnet_other_services_users }}'
|
||||
when: dnet_other_services_users is defined
|
||||
ignore_errors: True
|
||||
with_items: '{{ dnet_other_services_users | default([]) }}'
|
||||
tags: [ 'users', 'dnet' ]
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
---
|
||||
- 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 }}'
|
||||
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
|
||||
with_items: '{{ dnet_users_data_directories }}'
|
||||
with_items: '{{ dnet_users_data_directories | default([]) }}'
|
||||
when: not item.file
|
||||
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
|
||||
with_items: '{{ dnet_users_data_directories }}'
|
||||
with_items: '{{ dnet_users_data_directories | default([]) }}'
|
||||
when: not item.file
|
||||
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
|
||||
|
||||
- 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={{ item.aclperms | default ('rw') }} state=present
|
||||
with_items: '{{ dnet_users_data_directories }}'
|
||||
with_items: '{{ dnet_users_data_directories | default([]) }}'
|
||||
when: item.file
|
||||
tags: [ 'dnet', 'users', 'dnet_u_acl' ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue