Skip to content

Commit f9794d3

Browse files
committed
sap_hana_install: Ansible 2.24 compatibility
Signed-off-by: Bernd Finger <bfinger@redhat.com>
1 parent 76d2c12 commit f9794d3

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

roles/sap_hana_install/tasks/pre_tasks/check_filesystems.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
- name: SAP HANA - Install - Pre-Tasks - Set fact with mount details of {{ sap_hana_install_shared_path }}
1515
ansible.builtin.set_fact:
1616
__sap_hana_install_fact_mount_hana_shared:
17-
"{{ ansible_mounts | selectattr('mount', 'equalto', sap_hana_install_shared_path) | list | first }}"
18-
when: ansible_mounts | selectattr('mount', 'equalto', sap_hana_install_shared_path) | list | length > 0
17+
"{{ ansible_facts['mounts'] | selectattr('mount', 'equalto', sap_hana_install_shared_path) | list | first }}"
18+
when: ansible_facts['mounts'] | selectattr('mount', 'equalto', sap_hana_install_shared_path) | list | length > 0
1919

2020
- name: SAP HANA - Install - Pre-Tasks - Assert that filesystem is shared - {{ sap_hana_install_shared_path }}
2121
ansible.builtin.assert:
@@ -56,8 +56,8 @@
5656
- name: SAP HANA - Install - Pre-Tasks - Set fact with mount details of {{ __sap_hana_install_lss_inst_path }}
5757
ansible.builtin.set_fact:
5858
__sap_hana_install_fact_mount_lss_shared:
59-
"{{ ansible_mounts | selectattr('mount', 'equalto', __sap_hana_install_lss_inst_path) | list | first }}"
60-
when: ansible_mounts | selectattr('mount', 'equalto', __sap_hana_install_lss_inst_path) | list | length > 0
59+
"{{ ansible_facts['mounts'] | selectattr('mount', 'equalto', __sap_hana_install_lss_inst_path) | list | first }}"
60+
when: ansible_facts['mounts'] | selectattr('mount', 'equalto', __sap_hana_install_lss_inst_path) | list | length > 0
6161

6262
- name: SAP HANA - Install - Pre-Tasks - Assert that filesystem is shared - {{ __sap_hana_install_lss_inst_path }}
6363
ansible.builtin.assert:

roles/sap_hana_install/templates/sap-nw-input.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
#
55

66
# SAP HANA Instance Parameters
7-
sap_swpm_db_ip: '{{ ansible_default_ipv4.address|default(ansible_all_ipv4_addresses[0]) }}'
8-
sap_swpm_db_fqdn: '{{ ansible_fqdn }}'
9-
sap_swpm_db_host: '{{ ansible_hostname }}'
10-
sap_swpm_db_sid: '{{ sap_hana_install_sid }}'
11-
sap_swpm_db_instance_nr: '{{ sap_hana_install_number }}'
7+
sap_swpm_db_ip: "{{ ansible_facts['default_ipv4'].address|default(ansible_facts['all_ipv4_addresses'][0]) }}"
8+
sap_swpm_db_fqdn: "{{ ansible_facts['fqdn'] }}"
9+
sap_swpm_db_host: "{{ ansible_facts['hostname'] }}"
10+
sap_swpm_db_sid: "{{ sap_hana_install_sid }}"
11+
sap_swpm_db_instance_nr: "{{ sap_hana_install_number }}"
1212

1313
# SAP HANA Passwords
1414
sap_swpm_db_system_password: '{{ sap_hana_install_db_system_password|d(sap_hana_install_master_password) }}'

roles/sap_hana_install/vars/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ __sap_hana_install_sid_prohibited: ['ADD', 'ADM', 'ALL', 'AMD', 'AND', 'ANY', 'A
88
__sap_hana_install_fact_tmp_dirname: ''
99

1010
# This dictionary defines keyword rules to identify SAP binaries compatible with modern Linux distributions supported by SAP HANA.
11-
# Each key is a valid `ansible_architecture` value.
11+
# Each key is a valid "ansible_facts['architecture']" value.
1212
# The value is a list of rule sets, where each rule set is a list of keywords.
1313
# A file is considered a match if all keywords from any single rule set are found in the `file` command's output.
1414
__sap_hana_install_architecture_matrix:
@@ -40,7 +40,7 @@ __sap_hana_install_architecture_matrix:
4040
- ['aarch64']
4141

4242
# Sets the default host which will run all non-addhosts tasks.
43-
__sap_hana_install_fact_main_host: "{{ ansible_hostname }}"
43+
__sap_hana_install_fact_main_host: "{{ ansible_facts['hostname'] }}"
4444

4545
# Sets default value of Scale-Out detection.
4646
# Detection for scaleout is based on addhosts string.

0 commit comments

Comments
 (0)