2017-04-12 11:43:01 +02:00
|
|
|
---
|
2019-12-16 14:10:56 +01:00
|
|
|
- name: Springboot startup files management
|
|
|
|
block:
|
|
|
|
- name: Install the springboot app upstart init file
|
|
|
|
template: src=springboot-upstart.conf.j2 dest=/etc/init/{{ item.name }}.conf owner=root group=root mode=0644
|
|
|
|
with_items: '{{ springboot_apps }}'
|
|
|
|
when: ansible_service_mgr != 'systemd'
|
2017-04-12 11:43:01 +02:00
|
|
|
|
2019-12-16 14:10:56 +01:00
|
|
|
- name: Install the springboot systemd service unit
|
|
|
|
template: src=springboot.service.systemd.j2 dest=/etc/systemd/system/{{ item.name }}.service mode=0644 owner=root group=root
|
|
|
|
with_items: '{{ springboot_apps }}'
|
|
|
|
when: ansible_service_mgr == 'systemd'
|
|
|
|
notify: systemd reload
|
2017-04-12 11:43:01 +02:00
|
|
|
|
2019-12-16 14:10:56 +01:00
|
|
|
- name: Install the springboot logrotate configuration
|
|
|
|
template: src=springboot-logrotate.j2 dest=/etc/logrotate.d/{{ item.name }} owner=root group=root mode=0444
|
|
|
|
with_items: '{{ springboot_apps }}'
|
|
|
|
|
|
|
|
- name: Ensure that the springboot service is running and enabled
|
|
|
|
service: name={{ item.name }} state=started enabled=yes
|
|
|
|
with_items: '{{ springboot_apps }}'
|
|
|
|
|
|
|
|
when: springboot_config | bool
|
2017-04-12 11:43:01 +02:00
|
|
|
tags: [ 'springboot', 'springboot_config' ]
|