Skip to content

Commit c130c93

Browse files
authored
Merge pull request #1035 from berndfinger/issue-1030-convert-catalog-id-to-string
sap_swpm: Fix issue #1030
2 parents 35ab929 + 6e7fe5f commit c130c93

File tree

8 files changed

+18
-22
lines changed

8 files changed

+18
-22
lines changed

roles/sap_swpm/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ sap_swpm_virtual_hostname:
252252

253253
# Two methods exist for SAP NWAS JAVA, jload and extramile (BatchDeployer) before call to Deploy Controller Runner
254254
# Default to extramile for SAP NWAS JAVA, except SAP S/4HANA
255-
sap_swpm_java_import_method: "{{ 'jload' if 'S4H' in sap_swpm_product_catalog_id else 'extramile' }}"
255+
sap_swpm_java_import_method: "{{ 'jload' if 'S4H' in sap_swpm_product_catalog_id | string else 'extramile' }}"
256256

257257
# Use empty list which will create inifile parameter as blank for default installation
258258
sap_swpm_java_template_id_selected_list: []

roles/sap_swpm/tasks/post_install.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@
6767
when:
6868
- sap_swpm_sum_start
6969
- not sap_swpm_swpm_observer_mode
70-
- "'NW_ABAP_CI:' in sap_swpm_product_catalog_id or 'NW_ABAP_OneHost:' in sap_swpm_product_catalog_id"
70+
- "'NW_ABAP_CI:' in sap_swpm_product_catalog_id | string or
71+
'NW_ABAP_OneHost:' in sap_swpm_product_catalog_id | string"

roles/sap_swpm/tasks/pre_install/generate_inifile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@
9898
ansible.builtin.set_fact:
9999
sap_swpm_db_schema: "{{ sap_swpm_db_schema_abap }}"
100100
sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_abap_password }}"
101-
when: "'ABAP' in sap_swpm_product_catalog_id"
101+
when: "'ABAP' in sap_swpm_product_catalog_id | string"
102102

103103
- name: SAP SWPM Pre Install - Set password facts when Java
104104
ansible.builtin.set_fact:
105105
sap_swpm_db_schema: "{{ sap_swpm_db_schema_java }}"
106106
sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_java_password }}"
107-
when: "'Java' in sap_swpm_product_catalog_id"
107+
when: "'Java' in sap_swpm_product_catalog_id | string"
108108

109109
# If the individual passwords are set to a non empty string, use those:
110110
- name: SAP SWPM Pre Install - Set other user passwords using master password

roles/sap_swpm/tasks/pre_install/install_type.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,19 @@
1717
# - Advanced Adapter Engine Extended (AEX) with .AEX .AEXHA
1818
# - Process Integration / Process Orchestration (PI/PO) with .PI .PIHA .PIABAP .PIABAPHA .PIJAVA .PIJAVAHA
1919

20-
#- name: SAP SWPM Pre Install - Check if general SAP Software installation
21-
# ansible.builtin.set_fact:
22-
# sap_swpm_swpm_installation_type: "general"
23-
# sap_swpm_swpm_installation_header: "General installation of SAP Software"
24-
# when:
25-
# - "not '.ABAPHA' in sap_swpm_product_catalog_id"
26-
# - "not '.CP' in sap_swpm_product_catalog_id"
27-
2820
- name: SAP SWPM Pre Install - Check if System Copy (Backup/Restore)
2921
ansible.builtin.set_fact:
3022
sap_swpm_swpm_installation_type: "restore"
3123
sap_swpm_swpm_installation_header: "System Copy restore from backup"
32-
when:
33-
- "'.CP' in sap_swpm_product_catalog_id"
24+
when: "'.CP' in sap_swpm_product_catalog_id | string"
3425

3526
- name: SAP SWPM Pre Install - Check if SAP High Availability installation
3627
ansible.builtin.set_fact:
3728
sap_swpm_swpm_installation_type: "ha"
3829
sap_swpm_swpm_installation_header: "High Availability Installation using virtual hostname"
39-
when:
40-
- "'.ABAPHA' in sap_swpm_product_catalog_id or '.HA' in sap_swpm_product_catalog_id or '.HACP' in sap_swpm_product_catalog_id"
30+
when: "'.ABAPHA' in sap_swpm_product_catalog_id | string or
31+
'.HA' in sap_swpm_product_catalog_id | string or
32+
'.HACP' in sap_swpm_product_catalog_id | string"
4133

4234
- name: SAP SWPM Pre Install - Check if installation using SAP Maintenance Planner
4335
ansible.builtin.set_fact:
@@ -51,7 +43,7 @@
5143
sap_swpm_swpm_installation_type: "ha_maint_plan_stack"
5244
sap_swpm_swpm_installation_header: "High Availability Installation using virtual hostname and SAP Maintenance Planner Stack XML"
5345
when:
54-
- "'.ABAPHA' in sap_swpm_product_catalog_id"
46+
- "'.ABAPHA' in sap_swpm_product_catalog_id | string"
5547
- sap_swpm_mp_stack_path is defined and not sap_swpm_mp_stack_path is none
5648

5749
################

roles/sap_swpm/tasks/pre_install/install_type/ha_install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# - name: SAP SWPM Pre Install - HA Installation - Create User when ASCS (initial HA setup)
1616
# ansible.builtin.include_tasks: ../create_os_user.yml
1717
# when:
18-
# - "'_ASCS' in sap_swpm_product_catalog_id"
18+
# - "'_ASCS' in sap_swpm_product_catalog_id | string"

roles/sap_swpm/tasks/pre_install/install_type/ha_maint_plan_stack_install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# - name: SAP SWPM Pre Install - HA Installation - Create User when ASCS (initial HA setup)
1616
# ansible.builtin.include_tasks: ../create_os_user.yml
1717
# when:
18-
# - "'_ASCS' in sap_swpm_product_catalog_id"
18+
# - "'_ASCS' in sap_swpm_product_catalog_id | string"
1919

2020

2121
# Install using SAP Maintenance Planner Stack XML

roles/sap_swpm/tasks/pre_install/install_type/restore_install.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
ansible.builtin.stat:
88
path: "{{ sap_swpm_backup_location }}"
99
register: sap_swpm_backup_location_stat
10-
failed_when: not sap_swpm_backup_location_stat.stat.exists and '.CP' in sap_swpm_product_catalog_id
10+
failed_when:
11+
- not sap_swpm_backup_location_stat.stat.exists
12+
- "'.CP' in sap_swpm_product_catalog_id | string"
1113

1214
- name: SAP SWPM Pre Install - Change ownership of backup location - {{ sap_swpm_backup_location }}
1315
ansible.builtin.file:
@@ -18,4 +20,5 @@
1820
owner: root
1921
group: root
2022
when:
21-
- sap_swpm_backup_location_stat.stat.exists and sap_swpm_backup_location_stat.stat.isdir
23+
- sap_swpm_backup_location_stat.stat.exists
24+
- sap_swpm_backup_location_stat.stat.isdir

roles/sap_swpm/tasks/pre_install/prepare_software.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
failed_when: not sap_swpm_kernel_independent_file_name_stat.stat.exists
266266

267267
- name: SAP SWPM Pre Install - Webdispatcher
268-
when: "'Webdispatcher' in sap_swpm_product_catalog_id"
268+
when: "'Webdispatcher' in sap_swpm_product_catalog_id | string"
269269
block:
270270

271271
# 7. Web Dispatcher

0 commit comments

Comments
 (0)