Cleanup the 'user' task.

This commit is contained in:
Andrea Dell'Amico 2022-06-22 14:11:51 +02:00
parent 4fe65d83d8
commit ba8fac4413
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 7 additions and 2 deletions

View File

@ -2,8 +2,13 @@
- name: User under with the service will run
block:
- name: Create the user that will run the springboot app {{ item.name }}
user: name={{ item.user }} home={{ item.install_dir }} createhome=no shell={{ item.user_shell | default(springboot_user_shell) }} system={{ item.system_user | default(springboot_system_user) }}
with_items: '{{ springboot_apps }}'
user:
name: '{{ item.user }}'
home: '{{ item.install_dir }}'
createhome: false
shell: '{{ item.user_shell | default(springboot_user_shell) }}'
system: '{{ item.system_user | default(springboot_system_user) }}'
looop: '{{ springboot_apps }}'
when: item.user is defined
- name: Create the install directory of the springboot app {{ item.name }}