Skip to content

Commit

Permalink
Merge pull request #266 from guidograzioli/amw_191_rpm_install_home_i…
Browse files Browse the repository at this point in the history
…ncorrectly_set

Fix RPM installation have home directory incorrectly set
  • Loading branch information
guidograzioli committed Jan 31, 2024
2 parents 0ce341b + 3063683 commit 4b091d1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
5 changes: 4 additions & 1 deletion roles/jws/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ jws_apps_to_remove: 'examples'
jws_install_dir: /opt
jws_rpm: "jws{{ jws_version[0:1] | default('6') }}"
jws_rpm_root_dir: "/opt/rh/jws{{ jws_version[0:1] | default('6') }}/"
jws_rpm_home: "/opt/rh/jws{{ jws_version[0:1] | default('6') }}/root/usr/share/tomcat"
jws_rpm_service_name: "jws{{ jws_version[0:1] | default('6') }}-tomcat"

jws_home: "{{ jws_install_dir }}/{{ jws_zipfile_rootdir }}"
jws_zipfile_rootdir: "apache-tomcat-{{ tomcat_version }}"
jws_zipfile_home: "{{ jws_install_dir }}/{{ jws_zipfile_rootdir }}"

jws_home: "{{ (jws_install_method == 'rpm') | ternary(jws_rpm_home, jws_zipfile_home) }}"

# if True continue installing even if a running tomcat is found
jws_force_install: False
Expand Down
18 changes: 15 additions & 3 deletions roles/jws/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ argument_specs:
type: "str"
jws_rpm_root_dir:
default: "/opt/rh/jws6/"
description: "Path to the install dir used by RPM (do not override unless you relocate the RPM"
description: "Path to the install dir used by RPM (do not override unless you relocate the RPM)"
type: "str"
jws_rpm_home:
default: "/opt/rh/jws6/root/usr/share/tomcat"
description: "Home directory used by RPM (do not override unless you relocate the RPM)"
type: "str"
jws_version:
required: False
Expand Down Expand Up @@ -385,8 +389,12 @@ argument_specs:
description: "Base directory of installation zipfile"
type: "str"
jws_home:
default: "{{ (jws_install_method == 'rpm') | ternary(jws_rpm_root_dir, jws_zipfile_home) }}"
description: "Home directory of jws installation"
type: "str"
jws_zipfile_home:
default: "{{ jws_install_dir }}/{{ jws_zipfile_rootdir }}"
description: "Home directory of tomcat installation"
description: "Home directory of jws zipfile installation"
type: "str"
uninstall:
options:
Expand Down Expand Up @@ -465,9 +473,13 @@ argument_specs:
description: "Base directory of installation zipfile"
type: "str"
jws_home:
default: "{{ jws_install_dir }}/{{ jws_zipfile_rootdir }}"
default: "{{ (jws_install_method == 'rpm') | ternary(jws_rpm_root_dir, jws_zipfile_home) }}"
description: "Home directory of jws installation"
type: "str"
jws_zipfile_home:
default: "{{ jws_install_dir }}/{{ jws_zipfile_rootdir }}"
description: "Home directory of jws zipfile installation"
type: "str"
jws_service_name:
default: "jws{{ jws_version.split('.')[0] | default('6')}}-tomcat"
description: "Name for the systemd unit"
Expand Down

0 comments on commit 4b091d1

Please sign in to comment.