DCD-352: Explicitly start/enable service rather than relying on handlers.

This commit is contained in:
Steve Smith
2019-06-03 12:26:09 +10:00
parent ecfd5309fc
commit bf50f2beb2
6 changed files with 8 additions and 22 deletions

View File

@@ -1,8 +1,7 @@
---
# Mostly for molecule testing, as skip-tags doesn't work with handlers.
# Mostly for molecule testing, as skip-tags doesn't in all cases
atl_startup_enable: true
atl_startup_restart: true
atl_startup_script_map:
jira: "start-jira.sh"
@@ -13,5 +12,4 @@ atl_startup_exec_path: "{{ atl_product_installation_current }}/bin/{{ atl_startu
atl_startup_exec_options: ["-fg"]
atl_startup_systemd_params: []
atl_systemd_service_name: "{{ atl_product_edition }}.service"

View File

@@ -1,13 +0,0 @@
---
- name: Restart Product
service:
name: "{{ atl_systemd_service_name }}"
state: restarted
when: atl_startup_restart
- name: Enable Product
service:
name: "{{ atl_systemd_service_name }}"
enabled: true
when: atl_startup_enable

View File

@@ -16,7 +16,6 @@
- "--no-search"
atl_startup_enable: false
atl_startup_restart: false
pre_tasks:
- name: Create systemd dir if necessary

View File

@@ -7,7 +7,6 @@
atl_product_edition: "jira-software"
atl_startup_enable: false
atl_startup_restart: false
pre_tasks:
- name: Create systemd dir if necessary

View File

@@ -15,7 +15,6 @@
atl_systemd_service_name: "synchrony.service"
atl_startup_enable: false
atl_startup_restart: false
pre_tasks:
- name: Create systemd dir if necessary

View File

@@ -4,6 +4,10 @@
template:
src: "product.service.j2"
dest: "/etc/systemd/system/{{ atl_systemd_service_name }}"
notify:
- Enable Product
- Restart Product
- name: Enable and start Product
service:
name: "{{ atl_systemd_service_name }}"
state: started
enabled: true
when: atl_startup_enable