From cfe97e25156fb6c2bcd6dadd15c6ab4d1f43c9ad Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Tue, 24 Mar 2020 17:01:02 +1100 Subject: [PATCH] Create role to stop product --- jira_dc_upgrade_node.yml | 9 ++------- roles/product_stop/defaults/main.yml | 19 +++++++++++++++++++ roles/product_stop/tasks/main.yml | 5 +++++ 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 roles/product_stop/defaults/main.yml create mode 100644 roles/product_stop/tasks/main.yml diff --git a/jira_dc_upgrade_node.yml b/jira_dc_upgrade_node.yml index 6cd35ab..09da5ad 100644 --- a/jira_dc_upgrade_node.yml +++ b/jira_dc_upgrade_node.yml @@ -12,14 +12,9 @@ atl_startup_systemd_params: - "LimitNOFILE=16384" - - pre_tasks: - - name: stop jira - service: - name: "{{ atl_systemd_service_name }}" - state: stopped - + roles: + - role: product_stop - role: product_common - role: product_install - role: jira_config diff --git a/roles/product_stop/defaults/main.yml b/roles/product_stop/defaults/main.yml new file mode 100644 index 0000000..45d6f8a --- /dev/null +++ b/roles/product_stop/defaults/main.yml @@ -0,0 +1,19 @@ +--- + +# Mostly for molecule testing, as skip-tags doesn't work with handlers. +atl_startup_enable: true +atl_startup_restart: "{{ lookup('env', 'ATL_STARTUP_RESTART') or true }}" + +atl_startup_script_map: + jira: "bin/start-jira.sh" + confluence: "bin/start-confluence.sh" + stash: "bin/start-bitbucket.sh" + crowd: "start_crowd.sh" + +atl_startup_exec_path: "{{ atl_product_installation_current }}/{{ atl_startup_script_map[atl_product_family] }}" +atl_startup_exec_options: ["-fg"] +atl_startup_systemd_params: [] + +atl_systemd_service_name: "{{ atl_product_edition }}.service" + +atl_systemd_service_target: "multi-user.target" diff --git a/roles/product_stop/tasks/main.yml b/roles/product_stop/tasks/main.yml new file mode 100644 index 0000000..c9a2cf5 --- /dev/null +++ b/roles/product_stop/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- name: stop {{ atl_product_family }} {{ atl_product_edition}} + service: + name: "{{ atl_systemd_service_name }}" + state: stopped