From ba7d360c30abac3c1b1ea77c79a6580012d47e1f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 29 Sep 2023 00:59:15 +0200 Subject: [PATCH 1/3] sap_hana_install: Solve issue #484 --- roles/sap_hana_install/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_hana_install/tasks/main.yml b/roles/sap_hana_install/tasks/main.yml index 2ac3810eb..1a8f2eb7a 100644 --- a/roles/sap_hana_install/tasks/main.yml +++ b/roles/sap_hana_install/tasks/main.yml @@ -3,7 +3,7 @@ - name: Rename some variables used by hdblcm configfile ansible.builtin.set_fact: sap_hana_install_sid: "{{ sap_hana_sid | d(sap_hana_install_sid) | d('') }}" - sap_hana_install_number: "{{ sap_hana_instance_number | d(sap_hana_install_instance_number | d(sap_hana_install_number) | d('')) }}" + sap_hana_install_number: "{{ sap_hana_instance_number | d(sap_hana_install_instance_nr) | d(sap_hana_install_instance_number) | d(sap_hana_install_number) | d('') }}" sap_hana_install_master_password: "{{ sap_hana_install_common_master_password | d(sap_hana_install_master_password) }}" sap_hana_install_system_usage: "{{ sap_hana_install_env_type | d(sap_hana_install_system_usage) }}" sap_hana_install_restrict_max_mem: "{{ sap_hana_install_mem_restrict | d(sap_hana_install_restrict_max_mem) }}" From 015116aea63e814dc62cc0812e6850cb57bf8ec7 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 29 Sep 2023 09:48:05 +0200 Subject: [PATCH 2/3] sap_hana_install: Adapt README.md --- roles/sap_hana_install/README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 3373a7dda..42ad2ca06 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -160,6 +160,12 @@ The firewall ports for SAP HANA are defined in member `port` of the first field member `state` is set to `enabled`, the ports will be enabled. If the member `state` is set to `disabled`, the ports will be disabled, which might be useful for testing. +Certain parameters have identical meanings, for supporting different naming schemes in playbooks and inventories. +You can find those in the task `Rename some variables used by hdblcm configfile` of the file `tasks/main.yml`. +Example: The parameter `sap_hana_install_number`, which is used by the role to define the hdblm parameter `number` +(= SAP HANA instance number) can be defined by setting `sap_hana_instance_number`, `sap_hana_install_instance_nr`, +`sap_hana_install_instance_number`, or `sap_hana_install_number`. The order of precedence is from left to right. + ### Default Parameters Please check the default parameters file for more information on other parameters that can be used as an input @@ -189,7 +195,7 @@ Sample Ansible Playbook Execution sap_hana_install_software_directory: /software/hana sap_hana_install_common_master_password: 'NewPass$321' sap_hana_install_sid: 'H01' - sap_hana_install_instance_number: '00' + sap_hana_install_instance_nr: '00' roles: - sap_hana_install ``` @@ -208,7 +214,7 @@ Sample Ansible Playbook Execution sap_hana_install_root_password: 'NewPass$321' sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' sap_hana_install_sid: 'H01' - sap_hana_install_instance_number: '00' + sap_hana_install_instance_nr: '00' roles: - sap_hana_install ``` @@ -228,7 +234,7 @@ Sample Ansible Playbook Execution sap_hana_install_common_master_password: 'NewPass$321' sap_hana_install_root_password: 'NewPass$321' sap_hana_install_sid: 'H01' - sap_hana_install_instance_number: '00' + sap_hana_install_instance_nr: '00' roles: - sap_hana_install ``` @@ -242,7 +248,7 @@ You can find more complex playbooks in directory `playbooks` of the collection ` #### Perform Initial Checks These checks are only performed if `sap_hana_install_force` is set to `true`. Its default value is `false` -- If variable `sap_hana_install_check_sidadm_user` is undefined or set to `y`: Check if user sidadm exists. If yes, +- If variable `sap_hana_install_check_sidadm_user` is undefined or set to `yes`: Check if user sidadm exists. If yes, abort the role. - Check if `/usr/sap/hostctrl/exe/saphostctrl` exists and get info on running HANA instances. @@ -303,7 +309,7 @@ in a temporary directory for use by the hdblcm command in the next step. - Set Log Mode key to overwrite value and apply to system. -- Apply SAP HANA license to the new deployed instance if set to `y`. +- Apply SAP HANA license to the new deployed instance if set to `yes`. - Set expiry of Unix created users to `never`. From 0c6d02191c9dcb0c4ff5546efdb8a1990b94b390 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 29 Sep 2023 11:21:43 +0200 Subject: [PATCH 3/3] playbooks: Adapt sap-hana-install sample variable --- playbooks/vars/sample-variables-sap-hana-install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/vars/sample-variables-sap-hana-install.yml b/playbooks/vars/sample-variables-sap-hana-install.yml index 0b12e4752..7a0e73a72 100644 --- a/playbooks/vars/sample-variables-sap-hana-install.yml +++ b/playbooks/vars/sample-variables-sap-hana-install.yml @@ -13,7 +13,7 @@ sap_hana_install_master_password: 'NewPass$321' # Instance details sap_hana_install_sid: 'HDB' -sap_hana_install_instance_number: "00" +sap_hana_install_instance_nr: "00" # ----------------------------- Optional parameters ------------------------------ #