Skip to content

Commit

Permalink
Merge pull request #478 from sean-freeman/sles_fix
Browse files Browse the repository at this point in the history
sap_install_media_detect: unar for sles
  • Loading branch information
berndfinger authored Sep 27, 2023
2 parents 84fbb1e + c7ad443 commit d9001db
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions roles/sap_install_media_detect/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
tags: sap_install_media_detect_rar_handling
when:
- sap_install_media_detect_rar_package == 'EPEL'
- ansible_os_family == 'RedHat'
- __sap_install_media_detect_register_rpm_q_epel.stdout != 'epel-release'

- name: SAP Install Media Detect - Cleanup - Remove sapfile utility
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---

- name: SAP Install Media Detect - Prepare - Install the unar package from EPEL
when: sap_install_media_detect_rar_package == 'EPEL'
when:
- sap_install_media_detect_rar_package == 'EPEL'
- ansible_os_family == 'RedHat'
block:

# Reason for noqa: Too much effort for now to examine the output of the yum module for the presence of a package
Expand Down Expand Up @@ -52,11 +54,30 @@
__sap_install_media_detect_rar_extract: '/usr/bin/unar'
__sap_install_media_detect_rar_extract_directory_argument: ' -o'

- name: SAP Install Media Detect - Prepare - Install an unrar package
when: sap_install_media_detect_rar_package != 'EPEL'

- name: SAP Install Media Detect - Prepare - Install the unar package (SLES)
when:
- ansible_os_family == 'Suse'
block:

# Requires SLES Basesystem_Module_* to obtain package
- name: SAP Install Media Detect - Prepare - SLES - Install the unar package
ansible.builtin.package:
name: unar
state: present

- name: SAP Install Media Detect - Prepare - SLES - Set facts
ansible.builtin.set_fact:
__sap_install_media_detect_rar_list: '/usr/bin/lsar'
__sap_install_media_detect_rar_extract: '/usr/bin/unar'
__sap_install_media_detect_rar_extract_directory_argument: ' -o'


- name: SAP Install Media Detect - Prepare - Install a rar extractor package (no EPEL)
when: sap_install_media_detect_rar_package != 'EPEL' # When default is overriden
block:

- name: SAP Install Media Detect - Prepare - unrar - Set facts
- name: SAP Install Media Detect - Prepare - rar extractor - Set facts
ansible.builtin.set_fact:
__sap_install_media_detect_rar_list: "{{ sap_install_media_detect_rar_list }}"
__sap_install_media_detect_rar_extract: "{{ sap_install_media_detect_rar_extract }}"
Expand Down

0 comments on commit d9001db

Please sign in to comment.