Skip to content

Commit

Permalink
dynamic archive_file_suffix initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
vassilismourikis authored and rpelisse committed Oct 5, 2023
1 parent ab39912 commit 9b7d6b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions roles/jws/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ argument_specs:
description: "JWS install archive filename"
type: "str"
jws_native_bundle:
default: "jws-{{ jws_version }}-application-server-RHEL{{ jws_native_rhel_version }}-{{ jws_patch_native_arch }}.zip"
default: "jws-{{ jws_version }}{{ (jws_version.startswith('6') | ternary('-optional-native-components-RHEL', '-application-server-RHEL')) }}{{ jws_native_rhel_version }}-{{ jws_patch_native_arch }}.zip"
description: "JWS native install archive filename"
type: "str"
jws_patch_bundle:
Expand All @@ -418,7 +418,7 @@ argument_specs:
description: "JWS native patch architecture"
type: "str"
jws_patch_native_bundle:
default: "jws-{{ jws_patch_version | default('[0-9]+[.][0-9]+[.][0-9]+') }}-application-server-RHEL{{ jws_native_rhel_version }}-{{ jws_patch_native_arch }}.zip"
default: "jws-{{ jws_patch_version | default('[0-9]+[.][0-9]+[.][0-9]+') }}{{ (jws_version.startswith('6') | ternary('-optional-native-components-RHEL', '-application-server-RHEL')) }}{{ jws_native_rhel_version }}-{{ jws_patch_native_arch }}.zip"
description: "JWS native patch archive filename"
type: "str"
jws_native_rhel_version:
Expand Down
2 changes: 1 addition & 1 deletion roles/jws/tasks/apply_cp/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
- name: "Apply native patch."
ansible.builtin.include_tasks: apply_cp/apply_cp.yml
vars:
archive_file_suffix: "-application-server-RHEL{{ jws_native_rhel_version | default(ansible_facts['distribution_major_version']) }}-{{ jws_patch_native_arch }}.zip"
archive_file_suffix: "{{ (jws_version.startswith('6') | ternary('-optional-native-components-RHEL', '-application-server-RHEL')) }}{{ jws_native_rhel_version | default(ansible_facts['distribution_major_version']) }}-{{ jws_patch_native_arch }}.zip"
2 changes: 1 addition & 1 deletion roles/jws/tasks/install/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

- name: Set filename for JWS native zipfile
ansible.builtin.set_fact:
jws_native_zipfile: "jws-{{ jws_version }}-application-server-RHEL{{ jws_native_rhel_major_version }}-{{ jws_native_zipfile_arch }}.zip"
jws_native_zipfile: "jws-{{ jws_version }}{{ (jws_version.startswith('6') | ternary('-optional-native-components-RHEL', '-application-server-RHEL')) }}{{ jws_native_rhel_major_version }}-{{ jws_native_zipfile_arch }}.zip"
when:
- jws_native is defined
- not jws_native_zipfile is defined or jws_native_zipfile | length == 0

0 comments on commit 9b7d6b6

Please sign in to comment.