diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 56e1339dc..3e20526c0 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -83,6 +83,13 @@ - '/hana/data' tags: sap_hana_install_chown_hana_directories + # SELinux is not currently supported by SAP using SLES4SAP + # This is a workaround to avoid change to default to enable SELinux + - name: SAP HANA Pre Install - Ensure SELinux does not execute for SLES + ansible.builtin.set_fact: + sap_hana_install_modify_selinux_labels: false + when: ansible_os_family == "Suse" + - name: SAP HANA Pre Install - Configure '/hana' SELinux file contexts ansible.builtin.include_role: name: '{{ sap_hana_install_system_roles_collection }}.selinux' diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index 38c0e6478..3e9c3ed7c 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -20,7 +20,7 @@ sap_swpm_swpm_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" # If SWPM is running a normal install Ansible Variable sap_swpm_swpm_command_virtual_hostname is blank # IF SWPM is running a HA installation, Ansible Variable sap_swpm_swpm_command_virtual_hostname is set and contains "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }} IS_HOST_LOCAL_USING_STRING_COMPARE=true" - # If SWPM is running a MP Stack XML installation, Ansible Variable sap_swpm_swpm_command_mp_stack is set and contains "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + # If SWPM is running a MP Stack XML installation, Ansible Variable sap_swpm_swpm_command_mp_stack is set and contains "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }} + '/' (if needed) + {{ sap_swpm_mp_stack_file_name }}" sap_swpm_swpm_command_extra_args: "SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false {{ sap_swpm_swpm_command_virtual_hostname }} {{ sap_swpm_swpm_command_mp_stack }}" tags: sap_swpm_sapinst_commandline @@ -62,7 +62,7 @@ - " WEBDISP - {{ sap_swpm_web_dispatcher_path }}/{{ sap_swpm_web_dispatcher_file_name }} " - " SAPCAR - {{ sap_swpm_sapcar_path }}/{{ sap_swpm_sapcar_file_name }} " - " SWPM - {{ sap_swpm_swpm_path }}/{{ sap_swpm_swpm_sar_file_name }} " - - " MP Stack - {{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }} " + - " MP Stack - {{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" - " Backup - {{ sap_swpm_backup_location }} " - name: SAP SWPM - Installation Process diff --git a/roles/sap_swpm/tasks/pre_install/install_type/ha_maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/ha_maint_plan_stack_install.yml index c725e3bf8..b870fe719 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/ha_maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/ha_maint_plan_stack_install.yml @@ -18,7 +18,7 @@ # Install using SAP Maintenance Planner Stack XML # Check for MP Stack XML if filename not given -- name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_mp_stack_path }} +- name: SAP SWPM Pre Install - MP Stack XML - Search for MP_*.xml file in {{ sap_swpm_mp_stack_path }} ansible.builtin.shell: | ls MP*.xml args: @@ -31,7 +31,7 @@ (sap_swpm_mp_stack_file_name is none) or (sap_swpm_mp_stack_file_name | length == 0) -- name: SAP SWPM Pre Install - MP Stack XML - Set fact +- name: SAP SWPM Pre Install - MP Stack XML - Set fact for filename ansible.builtin.set_fact: sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" # Test if variable string is not defined or None / blank @@ -41,22 +41,22 @@ (sap_swpm_mp_stack_file_name is none) or (sap_swpm_mp_stack_file_name | length == 0) -- name: SAP SWPM Pre Install - MP Stack XML - Set fact +- name: SAP SWPM Pre Install - MP Stack XML - Show File and Path ansible.builtin.debug: - msg: "SAP Maintenance Planner Stack XML is {{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + msg: "SAP Maintenance Planner Stack XML is {{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" - name: SAP SWPM Pre Install - MP Stack XML - Set fact for SWPM injection ansible.builtin.set_fact: - sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" - name: SAP SWPM Pre Install - MP Stack XML - Ensure (1 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML ansible.builtin.replace: - path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + path: "{{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" regexp: '([A-Z][0-9])\w' replace: '{{ sap_swpm_sid | upper }}' diff --git a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml index ee5dd79f3..bd48c68a7 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type/maint_plan_stack_install.yml @@ -3,7 +3,7 @@ # Install using SAP Maintenance Planner Stack XML # Check for MP Stack XML if filename not given -- name: SAP SWPM Pre Install - MP Stack XML - Get from {{ sap_swpm_mp_stack_path }} +- name: SAP SWPM Pre Install - MP Stack XML - Search for MP_*.xml file in {{ sap_swpm_mp_stack_path }} ansible.builtin.shell: | ls MP*.xml args: @@ -16,7 +16,7 @@ (sap_swpm_mp_stack_file_name is none) or (sap_swpm_mp_stack_file_name | length == 0) -- name: SAP SWPM Pre Install - MP Stack XML - Set fact +- name: SAP SWPM Pre Install - MP Stack XML - Set fact for filename ansible.builtin.set_fact: sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_stack_file_get.stdout }}" # Test if variable string is not defined or None / blank @@ -26,22 +26,22 @@ (sap_swpm_mp_stack_file_name is none) or (sap_swpm_mp_stack_file_name | length == 0) -- name: SAP SWPM Pre Install - MP Stack XML - Set fact +- name: SAP SWPM Pre Install - MP Stack XML - Show File and Path ansible.builtin.debug: - msg: "SAP Maintenance Planner Stack XML is {{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + msg: "SAP Maintenance Planner Stack XML is {{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" - name: SAP SWPM Pre Install - MP Stack XML - Set fact for SWPM injection ansible.builtin.set_fact: - sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + sap_swpm_swpm_command_mp_stack: "SAPINST_STACK_XML={{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" - name: SAP SWPM Pre Install - MP Stack XML - Ensure (1 of 2) SAP System ID is correct inside SAP Maintenance Plan Stack XML ansible.builtin.replace: - path: "{{ sap_swpm_mp_stack_path }}/{{ sap_swpm_mp_stack_file_name }}" + path: "{{ (sap_swpm_mp_stack_path + '/' + sap_swpm_mp_stack_file_name) | regex_replace ('//*', '/') }}" regexp: '([A-Z][0-9])\w' replace: '{{ sap_swpm_sid | upper }}'