mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 16:33:08 -06:00
DCD-352: Make the service-file installation generic across products.
This commit is contained in:
@@ -16,3 +16,4 @@
|
|||||||
- role: product_install
|
- role: product_install
|
||||||
- role: database_init
|
- role: database_init
|
||||||
- role: confluence_config
|
- role: confluence_config
|
||||||
|
- role: product_startup
|
||||||
|
|||||||
@@ -16,4 +16,4 @@
|
|||||||
- role: product_install
|
- role: product_install
|
||||||
- role: database_init
|
- role: database_init
|
||||||
- role: jira_config
|
- role: jira_config
|
||||||
- role: jira_startup
|
- role: product_startup
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Restart Jira
|
|
||||||
service: name=jira.service state=restarted
|
|
||||||
|
|
||||||
- name: Enable Jira
|
|
||||||
command: systemctl enable jira.service
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Install Jira service file
|
|
||||||
template:
|
|
||||||
src: jira.service.j2
|
|
||||||
dest: /etc/systemd/system/jira.service
|
|
||||||
notify:
|
|
||||||
- Enable Jira
|
|
||||||
- Restart Jira
|
|
||||||
|
|
||||||
8
roles/product_startup/defaults/main.yml
Normal file
8
roles/product_startup/defaults/main.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
atl_startup_script_map:
|
||||||
|
jira: "start-jira.sh"
|
||||||
|
confluence: "start-confluence.sh"
|
||||||
|
stash: "start-bitbucket.sh"
|
||||||
|
|
||||||
|
atl_systemd_service_name: "{{ atl_product_edition }}.service"
|
||||||
9
roles/product_startup/handlers/main.yml
Normal file
9
roles/product_startup/handlers/main.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Restart Product
|
||||||
|
service:
|
||||||
|
name: "{{ atl_systemd_service_name }}"
|
||||||
|
stat: restarted
|
||||||
|
|
||||||
|
- name: Enable Jira
|
||||||
|
command: systemctl enable "{{ atl_systemd_service_name }}"
|
||||||
9
roles/product_startup/tasks/main.yml
Normal file
9
roles/product_startup/tasks/main.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: "Install systemd service file"
|
||||||
|
template:
|
||||||
|
src: "product.service.j2"
|
||||||
|
dest: "/etc/systemd/system/{{ atl_systemd_service_name }}"
|
||||||
|
notify:
|
||||||
|
- Enable Product
|
||||||
|
- Restart Product
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Atlassian Jira
|
Description=Atlassian {{ atl_product_edition }}
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User={{ atl_product_user }}
|
User={{ atl_product_user }}
|
||||||
Group={{ atl_product_user }}
|
Group={{ atl_product_user }}
|
||||||
|
|
||||||
ExecStart={{ atl_product_installation_current }}/bin/start-jira.sh -fg
|
ExecStart={{ atl_product_installation_current }}/bin/{{ atl_startup_script_map[atl_product_family] }} -fg
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
Reference in New Issue
Block a user