library/roles/tomcat-multiple-instances/tasks/main.yml: Fix defaults for the users creation.

This commit is contained in:
Andrea Dell'Amico 2017-04-19 19:19:24 +02:00
parent 4f45181ac9
commit a745a6a46f
1 changed files with 1 additions and 4 deletions

View File

@ -8,14 +8,12 @@
tags: [ 'tomcat', 'tomcat_instances' ]
- name: Create a tomcat user for each instance if needed
user: name={{ item.user }} home={{ item.user_home }} createhome=false shell={{ item.user_shell }}
user: name={{ item.user }} home={{ item.user_home }} createhome=false shell={{ item.user_shell | default('/bin/false') }}
with_items: '{{ tomcat_m_instances }}'
when:
- not tomcat_m_use_default_user
- item.user != "tomcat{{ tomcat_version }}"
- item.user_shell is defined
register: tomcat_first_install
ignore_errors: True
tags: [ 'tomcat', 'tomcat_instances' ]
- name: Create a tomcat user if needed
@ -24,7 +22,6 @@
- tomcat_m_use_default_user
- tomcat_m_default_user != "tomcat{{ tomcat_version }}"
register: tomcat_first_install
ignore_errors: True
tags: [ 'tomcat', 'tomcat_instances' ]
- name: Create the instances directory trees