diff --git a/roles/jws/defaults/main.yml b/roles/jws/defaults/main.yml index 8edf9397..c5d97a75 100644 --- a/roles/jws/defaults/main.yml +++ b/roles/jws/defaults/main.yml @@ -4,8 +4,9 @@ jws_apps_to_remove: 'examples' # root directory of installation jws_install_dir: /opt -jws_rpm: jws5 -jws_rpm_root_dir: /opt/rh/jws5/ +jws_rpm: "jws{{ jws_version[0:1] | default('5') }}" +jws_rpm_root_dir: "/opt/rh/jws{{ jws_version[0:1] | default('5') }}/" +jws_rpm_service_name: "jws{{ jws_version[0:1] | default('5') }}-tomcat" # if True continue installing even if a running tomcat is found jws_force_install: False @@ -101,7 +102,7 @@ jws_modcluster_sticky_session_remove: True jws_systemd_enabled: False jws_systemd_script_interpreter: 'bash' jws_systemd_script_shebang: "#!/bin/{{ jws_systemd_script_interpreter }}" -jws_service_name: 'tomcat' +jws_service_name: "{{ (jws_install_method == 'rpm') | ternary(jws_rpm_service_name, 'tomcat') }}" jws_service_systemd: "/usr/lib/systemd/system/{{ jws_service_name }}.service" jws_service_systemd_type: "simple" jws_selinux_enabled: False diff --git a/roles/jws/meta/argument_specs.yml b/roles/jws/meta/argument_specs.yml index 28de0974..47804144 100644 --- a/roles/jws/meta/argument_specs.yml +++ b/roles/jws/meta/argument_specs.yml @@ -389,10 +389,6 @@ argument_specs: default: False description: "Install JWS most recent cumulative patch for requested version" type: "bool" - jws_service_name: - default: "jws5-tomcat" - description: "Name for the systemd unit" - type: "str" jws_selinux_enabled: default: True description: "Enable selinux policy enforcement for JWS" diff --git a/roles/jws/tasks/install/rpm.yml b/roles/jws/tasks/install/rpm.yml index eb4ddd33..952325fe 100644 --- a/roles/jws/tasks/install/rpm.yml +++ b/roles/jws/tasks/install/rpm.yml @@ -50,7 +50,7 @@ when: - jws_rpm_root_dir_enable_stat is defined and jws_rpm_root_dir_enable_stat.stat is defined - jws_rpm_root_dir_enable_stat.stat.exists is defined - - not jws_rpm_root_dir_enable_stat + - not jws_rpm_root_dir_enable_stat.stat.exists notify: - Ensure Tomcat runs under systemd