Choose the user type and shell.
This commit is contained in:
parent
707bb6adf7
commit
4fe65d83d8
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
springboot_config: True
|
springboot_config: True
|
||||||
|
springboot_system_user: true
|
||||||
|
springboot_user_shell: /usr/sbin/nologin
|
||||||
springboot_install_artifact: True
|
springboot_install_artifact: True
|
||||||
springboot_apps: []
|
springboot_apps: []
|
||||||
# - { name: 'foo', log_dir: '/var/log/foo', install_dir: '/usr/lib/foo', state: 'present', app_conf_file: '', remote_conf_url: '', logback_url: '', logback_file: '', user: 'foo', java_opts: '', maven_repo_url: '', maven_id: '', maven_group_id: '', maven_extension: '', maven_version: '' }
|
# - { name: 'foo', log_dir: '/var/log/foo', install_dir: '/usr/lib/foo', state: 'present', app_conf_file: '', remote_conf_url: '', logback_url: '', logback_file: '', user: 'foo', java_opts: '', maven_repo_url: '', maven_id: '', maven_group_id: '', maven_extension: '', maven_version: '' }
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- name: User under with the service will run
|
- name: User under with the service will run
|
||||||
block:
|
block:
|
||||||
- name: Create the user that will run the springboot app {{ item.name }}
|
- name: Create the user that will run the springboot app {{ item.name }}
|
||||||
user: name={{ item.user }} home={{ item.install_dir }} createhome=no shell=/usr/sbin/nologin system=yes
|
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 }}'
|
with_items: '{{ springboot_apps }}'
|
||||||
when: item.user is defined
|
when: item.user is defined
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue