library/roles/d4s_user_services_perms: Change the gcore task to handle the case of multiple users.

d4science-ghn-cluster/group_vars/ghn_d4research: The collector needs two users.
This commit is contained in:
Andrea Dell'Amico 2016-11-10 14:04:14 +01:00
parent 5c8b31c52a
commit f17ef0d2e1
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ d4s_service_node: False
smartgears_node: False
d4s_tomcat_node: False
gcore_node: False
gcore_multiple_users: False
d4science_sudoers_commands:
- /etc/init.d/tomcat-instance-*

View File

@ -1,6 +1,12 @@
---
- name: Create the d4science user
user: name={{ d4science_user }} home={{ d4science_user_home }} createhome={{ d4science_user_create_home }} shell={{ d4science_user_shell }}
when: not gcore_multiple_users
tags: [ 'gcore', 'd4science', 'users' ]
- name: Create the d4science users
user: name={{ item }} home=/home/{{ item }} createhome={{ d4science_user_create_home }} shell={{ d4science_user_shell }}
with_items: '{{ gcore_users | default([]) }}'
when: gcore_multiple_users
tags: [ 'gcore', 'd4science', 'users' ]