diff --git a/roles/sap_general_preconfigure/README.md b/roles/sap_general_preconfigure/README.md index 43419227f..2c61a6366 100644 --- a/roles/sap_general_preconfigure/README.md +++ b/roles/sap_general_preconfigure/README.md @@ -392,7 +392,7 @@ in variable `sap_general_preconfigure_sap_directories`.
### sap_general_preconfigure_size_of_tmpfs_gb - _Type:_ `str` -- _Default:_ `"{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}"` +- _Default:_ `"{{ ((0.75 * (ansible_facts['memtotal_mb'] + ansible_facts['swaptotal_mb'])) / 1024) | round | int }}"` The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735.
@@ -433,20 +433,20 @@ The maximum length of the hostname. See SAP note 611361.
### sap_general_preconfigure_hostname - _Type:_ `str` -- _Default:_ `"{{ ansible_hostname }}"` +- _Default:_ `"{{ ansible_facts['hostname'] }}"` The hostname to be used for updating or checking `/etc/hosts` entries.
### sap_general_preconfigure_domain - _Type:_ `str` -- _Default:_ `"{{ ansible_domain }}"` +- _Default:_ `"{{ ansible_facts['domain'] }}"` The DNS domain name to be used for updating or checking `/etc/hosts` entries.
Mandatory parameter when sap_general_preconfigure_modify_etc_hosts is set to true.
### sap_general_preconfigure_ip - _Type:_ `str` -- _Default:_ `"{{ ansible_default_ipv4.address }}"` +- _Default:_ `"{{ ansible_facts['default_ipv4'].address }}"` The IPV4 address to be used for updating or checking `/etc/hosts` entries.
diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 16f4aabae..f372de66e 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -145,7 +145,7 @@ sap_general_preconfigure_modify_selinux_labels: true # Set to `false` if you do not want to modify the SELinux labels for the SAP directories set # in variable `sap_general_preconfigure_sap_directories`. -sap_general_preconfigure_size_of_tmpfs_gb: "{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}" +sap_general_preconfigure_size_of_tmpfs_gb: "{{ ((0.75 * (ansible_facts['memtotal_mb'] + ansible_facts['swaptotal_mb'])) / 1024) | round | int }}" # The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735. sap_general_preconfigure_modify_etc_hosts: true @@ -167,13 +167,13 @@ sap_general_preconfigure_ignore_dns_failures: true # report such errors and continue running the role. # If "global" variables are set, use those. If not, default to the values from gather_facts: -sap_general_preconfigure_ip: "{{ sap_ip | d(ansible_default_ipv4.address) }}" +sap_general_preconfigure_ip: "{{ sap_ip | d(ansible_facts['default_ipv4'].address) }}" # The IPV4 address to be used for updating or checking `/etc/hosts` entries. -sap_general_preconfigure_hostname: "{{ sap_hostname | d(ansible_hostname) }}" +sap_general_preconfigure_hostname: "{{ sap_hostname | d(ansible_facts['hostname']) }}" # The hostname to be used for updating or checking `/etc/hosts` entries. -sap_general_preconfigure_domain: "{{ sap_domain | d(ansible_domain) }}" +sap_general_preconfigure_domain: "{{ sap_domain | d(ansible_facts['domain']) }}" # The DNS domain name to be used for updating or checking `/etc/hosts` entries. # Mandatory parameter when sap_general_preconfigure_modify_etc_hosts is set to true. diff --git a/roles/sap_general_preconfigure/handlers/main.yml b/roles/sap_general_preconfigure/handlers/main.yml index 5a930e9fe..9430ffa61 100644 --- a/roles/sap_general_preconfigure/handlers/main.yml +++ b/roles/sap_general_preconfigure/handlers/main.yml @@ -46,14 +46,14 @@ __sap_general_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg listen: __sap_general_preconfigure_regenerate_grub2_conf_handler when: - - ansible_distribution == 'RedHat' + - ansible_facts['distribution'] == 'RedHat' - name: "Set the grub.cfg location SLES" ansible.builtin.set_fact: __sap_general_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg listen: __sap_general_preconfigure_regenerate_grub2_conf_handler when: - - ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP' + - ansible_facts['distribution'] == 'SLES' or ansible_facts['distribution'] == 'SLES_SAP' - name: "Run grub-mkconfig (UEFI mode)" ansible.builtin.command: @@ -97,7 +97,7 @@ timeout: 30 listen: __sap_general_preconfigure_reboot_handler when: - - ansible_os_family == 'Suse' + - ansible_facts['os_family'] == 'Suse' - sap_general_preconfigure_reboot_ok | d(false) changed_when: false diff --git a/roles/sap_general_preconfigure/meta/argument_specs.yml b/roles/sap_general_preconfigure/meta/argument_specs.yml index 2f323d879..ea3b42bf4 100644 --- a/roles/sap_general_preconfigure/meta/argument_specs.yml +++ b/roles/sap_general_preconfigure/meta/argument_specs.yml @@ -296,7 +296,7 @@ argument_specs: type: bool sap_general_preconfigure_size_of_tmpfs_gb: - default: "{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}" + default: "{{ ((0.75 * (ansible_facts['memtotal_mb'] + ansible_facts['swaptotal_mb'])) / 1024) | round | int }}" description: - The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735. required: false @@ -340,14 +340,14 @@ argument_specs: type: str sap_general_preconfigure_hostname: - default: "{{ ansible_hostname }}" + default: "{{ ansible_facts['hostname'] }}" description: - The hostname to be used for updating or checking `/etc/hosts` entries. required: false type: str sap_general_preconfigure_domain: - default: "{{ ansible_domain }}" + default: "{{ ansible_facts['domain'] }}" description: - The DNS domain name to be used for updating or checking `/etc/hosts` entries. - Mandatory parameter when `sap_general_preconfigure_modify_etc_hosts` is set to true. @@ -355,7 +355,7 @@ argument_specs: type: str sap_general_preconfigure_ip: - default: "{{ ansible_default_ipv4.address }}" + default: "{{ ansible_facts['default_ipv4'].address }}" description: - The IPV4 address to be used for updating or checking `/etc/hosts` entries. required: false diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index 3773d7ad0..4731c836d 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -34,7 +34,7 @@ __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - - ansible_architecture != 's390x' + - ansible_facts['architecture'] != 's390x' - name: Assert - Set final list of repos, s390x, auto ansible.builtin.set_fact: @@ -44,7 +44,7 @@ __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - - ansible_architecture == 's390x' + - ansible_facts['architecture'] == 's390x' - name: Assert - Set final list of repos, manual ansible.builtin.set_fact: @@ -79,24 +79,24 @@ - name: Assert that the RHEL release is locked correctly ansible.builtin.assert: - that: __sap_general_preconfigure_register_subscription_manager_release_assert.stdout == ansible_distribution_version + that: __sap_general_preconfigure_register_subscription_manager_release_assert.stdout == ansible_facts['distribution_version'] fail_msg: "FAIL: The RHEL release lock status is '{{ __sap_general_preconfigure_register_subscription_manager_release_assert.stdout }}' - but the expected value is '{{ ansible_distribution_version }}'!" - success_msg: "PASS: The RHEL release is correctly locked to '{{ ansible_distribution_version }}'." + but the expected value is '{{ ansible_facts['distribution_version'] }}'!" + success_msg: "PASS: The RHEL release is correctly locked to '{{ ansible_facts['distribution_version'] }}'." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - when: "ansible_distribution_version != '7.9'" + when: "ansible_facts['distribution_version'] != '7.9'" - name: Report that checking the release lock is not necessary if the system is on RHEL 7.9 ansible.builtin.debug: - msg: "INFO: No need to check the release lock setting as the RHEL release {{ ansible_distribution_version }} - is the last RHEL {{ ansible_distribution_major_version }} minor release" - when: "ansible_distribution_version == '7.9'" + msg: "INFO: No need to check the release lock setting as the RHEL release {{ ansible_facts['distribution_version'] }} + is the last RHEL {{ ansible_facts['distribution_major_version'] }} minor release" + when: "ansible_facts['distribution_version'] == '7.9'" # Reason for noqa: A double brace might also occur in an awk command sequence. - name: Check RHEL 7 package groups when: - sap_general_preconfigure_packagegroups | length > 0 - - ansible_distribution_major_version == '7' + - ansible_facts['distribution_major_version'] == '7' block: - name: Set yum group list installed command # noqa jinja[spacing] @@ -125,7 +125,7 @@ - name: Check RHEL 8 environment groups when: - sap_general_preconfigure_envgroups | length > 0 - - ansible_distribution_major_version == '8' + - ansible_facts['distribution_major_version'] == '8' block: - name: Set yum envgroup list installed command # noqa jinja[spacing] @@ -169,7 +169,7 @@ register: __sap_general_preconfigure_register_required_ppc64le_packages_assert changed_when: false when: - - ansible_architecture == "ppc64le" + - ansible_facts['architecture'] == "ppc64le" - sap_general_preconfigure_install_ibm_power_tools ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" @@ -183,7 +183,7 @@ loop_control: loop_var: line_item when: - - ansible_architecture == "ppc64le" + - ansible_facts['architecture'] == "ppc64le" - sap_general_preconfigure_install_ibm_power_tools ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" @@ -280,20 +280,20 @@ - name: "Assert - Set needs-restarting command in case of RHEL 7" ansible.builtin.set_fact: __sap_general_preconfigure_fact_needs_restarting_command_assert: "needs-restarting -r" - when: ansible_distribution_major_version == '7' + when: ansible_facts['distribution_major_version'] == '7' - name: "Assert - Set needs-restarting command in case of RHEL 8 or greater, except RHEL 8.0" ansible.builtin.set_fact: __sap_general_preconfigure_fact_needs_restarting_command_assert: "yum needs-restarting -r" when: - - ansible_distribution_major_version | int >= 8 - - ansible_distribution_version != '8.0' + - ansible_facts['distribution_major_version'] | int >= 8 + - ansible_facts['distribution_version'] != '8.0' - name: "Assert - Set customized needs-restarting command in case of RHEL 8.0" ansible.builtin.set_fact: __sap_general_preconfigure_fact_needs_restarting_command_assert: "_IKRNL=$(rpm -q --last kernel | awk 'NR==1{sub(/kernel-/,\"\"); print $1}'); _CKRNL=$(uname -r); if [ ${_IKRNL} != ${_CKRNL} ]; then exit 1; else exit 0; fi" - when: ansible_distribution_version == '8.0' + when: ansible_facts['distribution_version'] == '8.0' - name: Assert - Display the command for checking a reboot requirement ansible.builtin.debug: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml index c9465aa5d..0c6109a74 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml @@ -3,7 +3,7 @@ - name: Assert that the DNS domain is set ansible.builtin.assert: - that: not( (ansible_domain is undefined) or (ansible_domain is none) or (ansible_domain | trim == '') ) + that: not( (ansible_facts['domain'] is undefined) or (ansible_facts['domain'] is none) or (ansible_facts['domain'] | trim == '') ) fail_msg: "FAIL: The DNS domain is not configured! So variable 'sap_general_preconfigure_domain' needs to be configured!" success_msg: "PASS: The DNS domain is configured." # ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" @@ -29,11 +29,11 @@ changed_when: false when: "'bind-utils' in ansible_facts.packages" -- name: Assert that ansible_default_ipv4.address is set +- name: Assert that ansible_facts['default_ipv4'].address is set ansible.builtin.assert: - that: not( (ansible_default_ipv4.address is undefined) or (ansible_default_ipv4.address is none) or (ansible_default_ipv4.address | trim == '') ) - fail_msg: "FAIL: The variable 'ansible_default_ipv4.address' is not defined!" - success_msg: "PASS: The variable 'ansible_default_ipv4.address' is defined." + that: not( (ansible_facts['default_ipv4'].address is undefined) or (ansible_facts['default_ipv4'].address is none) or (ansible_facts['default_ipv4'].address | trim == '') ) + fail_msg: "FAIL: The variable 'ansible_facts['default_ipv4'].address' is not defined!" + success_msg: "PASS: The variable 'ansible_facts['default_ipv4'].address' is defined." ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - name: Assert that sap_general_preconfigure_ip is set diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 0b924d447..c23b0e5ad 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -62,7 +62,7 @@ name: policycoreutils-python-utils when: - sap_general_preconfigure_modify_selinux_labels - - ansible_distribution_major_version != '7' + - ansible_facts['distribution_major_version'] != '7' - name: Check if the directory '/usr/sap' exists ansible.builtin.stat: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml index 931d1a943..6d4337b3f 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -94,8 +94,8 @@ - name: Set or unset SELinux kernel parameter, RHEL >= 8 when: - - ansible_os_family == 'RedHat' - - ansible_distribution_major_version | int >= 8 + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version'] | int >= 8 block: - name: SELinux - Examine grub entries diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml index 9ae623525..d773449d2 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml @@ -9,7 +9,7 @@ group: root mode: '0644' backup: true - when: ansible_distribution_major_version | int <= 8 + when: ansible_facts['distribution_major_version'] | int <= 8 - name: Copy file /etc/tmpfiles.d/sap.conf, RHEL 9 and later ansible.builtin.copy: @@ -19,4 +19,4 @@ group: root mode: '0644' backup: true - when: ansible_distribution_major_version | int >= 9 + when: ansible_facts['distribution_major_version'] | int >= 9 diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 3e96620b0..4295c93d3 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -34,7 +34,7 @@ __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - - ansible_architecture != 's390x' + - ansible_facts['architecture'] != 's390x' - name: Set final list of repos, s390x, auto ansible.builtin.set_fact: @@ -44,7 +44,7 @@ __sap_general_preconfigure_req_ha_repos | list }}" when: - sap_general_preconfigure_req_repos is undefined - - ansible_architecture == 's390x' + - ansible_facts['architecture'] == 's390x' - name: Set final list of repos, manual ansible.builtin.set_fact: @@ -106,21 +106,21 @@ msg: "The RHEL minor release lock is set correctly to '{{ __sap_general_preconfigure_register_subscription_manager_release.stdout }}'." when: - sap_general_preconfigure_set_minor_release - - __sap_general_preconfigure_register_subscription_manager_release.stdout == ansible_distribution_version + - __sap_general_preconfigure_register_subscription_manager_release.stdout == ansible_facts['distribution_version'] # Reason for noqa: Finding out if the minor release has already been set would require one more task. - name: Set the minor RHEL release # noqa no-changed-when - ansible.builtin.command: subscription-manager release --set="{{ ansible_distribution_version }}" + ansible.builtin.command: subscription-manager release --set="{{ ansible_facts['distribution_version'] }}" when: - sap_general_preconfigure_set_minor_release - - __sap_general_preconfigure_register_subscription_manager_release.stdout != ansible_distribution_version + - __sap_general_preconfigure_register_subscription_manager_release.stdout != ansible_facts['distribution_version'] tags: molecule-idempotence-notest - name: Ensure that the required package groups are installed, RHEL except 8.1 ansible.builtin.package: name: "{{ sap_general_preconfigure_packagegroups }}" state: present - when: ansible_distribution_version != '8.1' + when: ansible_facts['distribution_version'] != '8.1' # Note: We do not want package updates, see also Red Hat bug 1983749. # Because the installation of an environment or package group is not guaranteed to avoid package updates, @@ -130,7 +130,7 @@ - name: Ensure that the required package groups are installed, RHEL 8.1 # noqa command-instead-of-module no-changed-when ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} --nobest --exclude=kernel* -y" register: __sap_general_preconfigure_register_yum_group_install - when: ansible_distribution_version == '8.1' + when: ansible_facts['distribution_version'] == '8.1' tags: molecule-idempotence-notest # possible replacement once we no longer need Ansible 2.9 compatibility: @@ -140,7 +140,7 @@ # state: present # nobest: true # supported from Ansible 2.11 # register: __sap_general_preconfigure_register_yum_group_install -# when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9' +# when: ansible_facts['distribution_major_version'] == '8' or ansible_facts['distribution_major_version'] == '9' - name: Ensure that the required packages are installed ansible.builtin.package: @@ -153,7 +153,7 @@ state: present disable_gpg_check: True when: - - ansible_architecture == "ppc64le" + - ansible_facts['architecture'] == "ppc64le" - sap_general_preconfigure_install_ibm_power_tools | d(true) - sap_general_preconfigure_add_ibm_power_repo | d(true) @@ -161,7 +161,7 @@ ansible.builtin.shell: LESS=+q /opt/ibm/lop/configure <<<'y' changed_when: true when: - - ansible_architecture == "ppc64le" + - ansible_facts['architecture'] == "ppc64le" - sap_general_preconfigure_install_ibm_power_tools | d(true) - sap_general_preconfigure_add_ibm_power_repo | d(true) @@ -171,7 +171,7 @@ state: latest name: "{{ __sap_general_preconfigure_required_ppc64le }}" when: - - ansible_architecture == "ppc64le" + - ansible_facts['architecture'] == "ppc64le" - sap_general_preconfigure_install_ibm_power_tools | d(true) - name: Ensure that the minimum required package versions are installed @@ -243,20 +243,20 @@ - name: "Set needs-restarting command in case of RHEL 7" ansible.builtin.set_fact: __sap_general_preconfigure_fact_needs_restarting_command: "needs-restarting -r" - when: ansible_distribution_major_version == '7' + when: ansible_facts['distribution_major_version'] == '7' - name: "Set needs-restarting command in case of RHEL 8 or greater, except RHEL 8.0" ansible.builtin.set_fact: __sap_general_preconfigure_fact_needs_restarting_command: "yum needs-restarting -r" when: - - ansible_distribution_major_version | int >= 8 - - ansible_distribution_version != '8.0' + - ansible_facts['distribution_major_version'] | int >= 8 + - ansible_facts['distribution_version'] != '8.0' - name: "Set customized needs-restarting command in case of RHEL 8.0" ansible.builtin.set_fact: __sap_general_preconfigure_fact_needs_restarting_command: "_IKRNL=$(rpm -q --last kernel | awk 'NR==1{sub(/kernel-/,\"\"); print $1}'); _CKRNL=$(uname -r); if [ ${_IKRNL} != ${_CKRNL} ]; then exit 1; else exit 0; fi" - when: ansible_distribution_version == '8.0' + when: ansible_facts['distribution_version'] == '8.0' - name: Display the command for checking a reboot requirement ansible.builtin.debug: diff --git a/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_install.yml b/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_install.yml index d7e88ae35..3664abd28 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_install.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_install.yml @@ -13,8 +13,8 @@ __sap_general_preconfigure_use_saptune: false when: - '"SLES_SAP" not in __sap_general_preconfigure_register_baseproduct.stat.lnk_target' - - '"SLES" in __sap_general_preconfigure_register_baseproduct.stat.lnk_target - and ansible_distribution_major_version | int < 16' + - '"SLES" in __sap_general_preconfigure_register_baseproduct.stat.lnk_target' + - ansible_facts['distribution_major_version'] | int < 16 - name: Block to ensure saptune is installed diff --git a/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_takeover.yml b/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_takeover.yml index 142592732..8022fe965 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_takeover.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/generic/saptune_takeover.yml @@ -16,7 +16,7 @@ - __sap_general_preconfigure_use_saptune - __sap_general_preconfigure_register_saptune_check_before.rc != 0 # sapconf is not present on SLES 16 and takeover is not required. - - ansible_distribution_major_version | int < 16 + - ansible_facts['distribution_major_version'] | int < 16 block: - name: Check saptune version # noqa: command-instead-of-module ansible.builtin.command: diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index 55dfe6231..a0d404e8a 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -18,16 +18,16 @@ loop: "{{ __var_files }}" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" - __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" - __distribution_minor: "{{ ansible_distribution ~ '_' ~ ansible_distribution_version }}" + __distribution_major: "{{ ansible_facts['distribution'] ~ '_' ~ ansible_facts['distribution_major_version'] }}" + __distribution_minor: "{{ ansible_facts['distribution'] ~ '_' ~ ansible_facts['distribution_version'] }}" # Enables loading of shared vars between SLES and SLES_SAP - __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" - __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" + __distribution_major_split: "{{ ansible_facts['distribution'].split('_')[0] ~ '_' ~ ansible_facts['distribution_major_version'] }}" + __distribution_minor_split: "{{ ansible_facts['distribution'].split('_')[0] ~ '_' ~ ansible_facts['distribution_version'] }}" __var_files: >- {{ [ - ansible_os_family ~ '.yml', - (ansible_distribution ~ '.yml') if ansible_distribution != ansible_os_family else None, + ansible_facts['os_family'] ~ '.yml', + (ansible_facts['distribution'] ~ '.yml') if ansible_facts['distribution'] != ansible_facts['os_family'] else None, (__distribution_major_split ~ '.yml') if __distribution_major_split != __distribution_major else None, (__distribution_minor_split ~ '.yml') if __distribution_minor_split != __distribution_minor else None, __distribution_major ~ '.yml', @@ -113,9 +113,9 @@ tags: sap_general_preconfigure_installation when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_installation | d(false) with_first_found: - - '{{ ansible_distribution.split("_")[0] }}' - - '{{ ansible_distribution }}' - - '{{ ansible_os_family }}.yml' + - "{{ ansible_facts['distribution'].split('_')[0] }}" + - "{{ ansible_facts['distribution'] }}" + - "{{ ansible_facts['os_family'] }}.yml" tags: - sap_general_preconfigure_installation @@ -126,9 +126,9 @@ tags: sap_general_preconfigure_configuration when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_configuration | d(false) with_first_found: - - '{{ ansible_distribution.split("_")[0] }}' - - '{{ ansible_distribution }}' - - '{{ ansible_os_family }}.yml' + - "{{ ansible_facts['distribution'].split('_')[0] }}" + - "{{ ansible_facts['distribution'] }}" + - "{{ ansible_facts['os_family'] }}.yml" tags: - always diff --git a/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml b/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml index 07a716c03..bbad1f336 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/0941735.yml @@ -6,8 +6,8 @@ ansible.builtin.debug: msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^0941735$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^0941735$') | first).version }}): Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - always diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml index 591f2ee62..ce364c182 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-assert-tmpfs.yml @@ -4,8 +4,8 @@ - name: Assert 2772999-7 ansible.builtin.debug: msg: "SAP note 2772999 Step 7: Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - sap_general_preconfigure_configure_tmpfs diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml index fb1df10fa..f207aff10 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/07-configure-tmpfs.yml @@ -4,8 +4,8 @@ - name: Configure 2772999-7 ansible.builtin.debug: msg: "SAP note 2772999 Step 7: Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - sap_general_preconfigure_configure_tmpfs diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-assert-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-assert-tmpfs.yml index f64c621f6..dfae4c933 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-assert-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-assert-tmpfs.yml @@ -4,8 +4,8 @@ - name: Assert 3108316-7 ansible.builtin.debug: msg: "SAP note 3108316 Step 7: Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - sap_general_preconfigure_configure_tmpfs diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-configure-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-configure-tmpfs.yml index 44f130211..43e095fa6 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-configure-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3108316/07-configure-tmpfs.yml @@ -4,8 +4,8 @@ - name: Configure 3108316-7 ansible.builtin.debug: msg: "SAP note 3108316 Step 7: Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - sap_general_preconfigure_configure_tmpfs diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-assert-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-assert-tmpfs.yml index 48548d2e6..74475fd55 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-assert-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-assert-tmpfs.yml @@ -4,8 +4,8 @@ - name: Assert 3562909-7 ansible.builtin.debug: msg: "SAP note 3562909 Step 7: Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - sap_general_preconfigure_configure_tmpfs diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-configure-tmpfs.yml b/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-configure-tmpfs.yml index 99c61abfb..9a873661c 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-configure-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3562909/07-configure-tmpfs.yml @@ -4,8 +4,8 @@ - name: Configure 3562909-7 ansible.builtin.debug: msg: "SAP note 3562909 Step 7: Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - sap_general_preconfigure_configure_tmpfs diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml index 8c8a501a9..b4087c594 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-0941735.yml @@ -6,8 +6,8 @@ ansible.builtin.debug: msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^0941735$') | first).number }} (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^0941735$') | first).version }}): Configure tmpfs; - memtotal_mb = {{ ansible_memtotal_mb }}; - swaptotal_mb = {{ ansible_swaptotal_mb }}; + memtotal_mb = {{ ansible_facts['memtotal_mb'] }}; + swaptotal_mb = {{ ansible_facts['swaptotal_mb'] }}; sap_general_preconfigure_size_of_tmpfs_gb = {{ sap_general_preconfigure_size_of_tmpfs_gb }}" tags: - always diff --git a/roles/sap_general_preconfigure/vars/RedHat_10.yml b/roles/sap_general_preconfigure/vars/RedHat_10.yml index 435413661..9729aa9f8 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_10.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_10.yml @@ -12,7 +12,7 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" # RHEL 10 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_10_0: '{{ __sap_general_preconfigure_max_repo_type }}-' @@ -27,17 +27,17 @@ __sap_general_preconfigure_max_repo_type_string_10_8: '{{ __sap_general_preconfi __sap_general_preconfigure_max_repo_type_string_10_9: '' __sap_general_preconfigure_max_repo_type_string_10_10: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_facts['distribution_version'] | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_envgroups: - "server-product-environment" @@ -51,7 +51,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -101,7 +101,7 @@ __sap_general_preconfigure_packages_s390x: - langpacks-en - glibc-langpack-en -__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_required_ppc64le: - ibm-power-managed-rhel10 diff --git a/roles/sap_general_preconfigure/vars/RedHat_7.yml b/roles/sap_general_preconfigure/vars/RedHat_7.yml index 5478a445f..e9309bf0c 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_7.yml @@ -21,8 +21,8 @@ __sap_general_preconfigure_rhel_7_ha_arch_string_ppc64le: 'server-for-power-le' __sap_general_preconfigure_rhel_7_ha_arch_string_ppc64: '{{ __sap_general_preconfigure_rhel_7_arch_string_ppc64 }}' __sap_general_preconfigure_rhel_7_ha_arch_string_s390x: '{{ __sap_general_preconfigure_rhel_7_arch_string_s390x }}' -__sap_general_preconfigure_rhel_7_arch_string: "{{ lookup('vars', '__sap_general_preconfigure_rhel_7_arch_string_' + ansible_architecture) }}" -__sap_general_preconfigure_rhel_7_ha_arch_string: "{{ lookup('vars', '__sap_general_preconfigure_rhel_7_ha_arch_string_' + ansible_architecture) }}" +__sap_general_preconfigure_rhel_7_arch_string: "{{ lookup('vars', '__sap_general_preconfigure_rhel_7_arch_string_' + ansible_facts['architecture']) }}" +__sap_general_preconfigure_rhel_7_ha_arch_string: "{{ lookup('vars', '__sap_general_preconfigure_rhel_7_ha_arch_string_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_max_repo_type_x86_64: 'e4s-' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s-' @@ -34,8 +34,8 @@ __sap_general_preconfigure_max_repo_type_ha_ppc64le: '{{ __sap_general_preconfig __sap_general_preconfigure_max_repo_type_ha_ppc64: '{{ __sap_general_preconfigure_max_repo_type_ppc64 }}' __sap_general_preconfigure_max_repo_type_ha_s390x: '' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" -__sap_general_preconfigure_max_repo_type_ha: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_ha_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" +__sap_general_preconfigure_max_repo_type_ha: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_ha_' + ansible_facts['architecture']) }}" # RHEL 7 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_7_6: '{{ __sap_general_preconfigure_max_repo_type }}' @@ -47,17 +47,17 @@ __sap_general_preconfigure_max_repo_type_ha_string_7_7: '{{ __sap_general_precon __sap_general_preconfigure_max_repo_type_ha_string_7_8: '' __sap_general_preconfigure_max_repo_type_ha_string_7_9: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" -__sap_general_preconfigure_max_repo_type_ha_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_ha_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_facts['distribution_version'] | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_ha_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_ha_string_' + ansible_facts['distribution_version'] | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-sap-for-rhel-{{ ansible_distribution_major_version }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-sap-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-sap-hana-for-rhel-{{ ansible_distribution_major_version }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-sap-hana-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ __sap_general_preconfigure_rhel_7_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-ha-for-rhel-{{ ansible_distribution_major_version }}-{{ __sap_general_preconfigure_rhel_7_ha_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_ha_string }}rpms + - rhel-ha-for-rhel-{{ ansible_facts['distribution_major_version'] }}-{{ __sap_general_preconfigure_rhel_7_ha_arch_string }}-{{ __sap_general_preconfigure_max_repo_type_ha_string }}rpms __sap_general_preconfigure_envgroups: "" @@ -83,7 +83,7 @@ __sap_general_preconfigure_packagegroups_s390x: - "@network-file-system-client" - "@performance" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -116,7 +116,7 @@ __sap_general_preconfigure_packages_s390x: - tcsh - psmisc -__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_facts['architecture']) }}" # As per https://www14.software.ibm.com/support/customercare/sas/f/lopdiags/home.html : __sap_general_preconfigure_required_ppc64le: @@ -167,7 +167,7 @@ __sap_general_preconfigure_min_packages_7_8: __sap_general_preconfigure_min_packages_7_9: -__sap_general_preconfigure_min_pkgs: "{{ lookup('vars', '__sap_general_preconfigure_min_packages_' + ansible_distribution_version | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_min_pkgs: "{{ lookup('vars', '__sap_general_preconfigure_min_packages_' + ansible_facts['distribution_version'] | replace(\".\", \"_\")) }}" # Note: The value for vm.max_map_count of 2147483647 (previously 2000000) # is set according to SAP note 900929. diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml index d0f8fe031..1748d92d3 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml @@ -12,20 +12,20 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string: '{{ __sap_general_preconfigure_max_repo_type }}-' __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_envgroups: - "server-product-environment" @@ -39,7 +39,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages: - uuidd diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml index 375b7e05f..0d50aab1c 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml @@ -12,20 +12,20 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string: '{{ __sap_general_preconfigure_max_repo_type }}-' __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_envgroups: - "server-product-environment" @@ -39,7 +39,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -78,7 +78,7 @@ __sap_general_preconfigure_packages_s390x: - langpacks-en - glibc-langpack-en -__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_required_ppc64le: - ibm-power-managed-rhel8 diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml index bd26d320e..3e43d8eb9 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml @@ -12,20 +12,20 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string: '{{ __sap_general_preconfigure_max_repo_type }}-' __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_envgroups: - "server-product-environment" @@ -39,7 +39,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -78,7 +78,7 @@ __sap_general_preconfigure_packages_s390x: - langpacks-en - glibc-langpack-en -__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_required_ppc64le: - ibm-power-managed-rhel8 diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index 12ee9598d..dc2738aae 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -12,7 +12,7 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" # RHEL 8 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_8_3: '' @@ -24,17 +24,17 @@ __sap_general_preconfigure_max_repo_type_string_8_8: '{{ __sap_general_preconfig __sap_general_preconfigure_max_repo_type_string_8_9: '' __sap_general_preconfigure_max_repo_type_string_8_10: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_facts['distribution_version'] | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_envgroups: - "server-product-environment" @@ -48,7 +48,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -90,7 +90,7 @@ __sap_general_preconfigure_packages_s390x: - langpacks-en - glibc-langpack-en -__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_required_ppc64le: - ibm-power-managed-rhel8 diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index a25793787..3a66216d5 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -12,7 +12,7 @@ __sap_general_preconfigure_max_repo_type_x86_64: 'e4s' __sap_general_preconfigure_max_repo_type_ppc64le: 'e4s' __sap_general_preconfigure_max_repo_type_s390x: 'eus' -__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_architecture) }}" +__sap_general_preconfigure_max_repo_type: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_' + ansible_facts['architecture']) }}" # RHEL 9 minor releases maximum repo support duration __sap_general_preconfigure_max_repo_type_string_9_0: '{{ __sap_general_preconfigure_max_repo_type }}-' @@ -27,17 +27,17 @@ __sap_general_preconfigure_max_repo_type_string_9_8: '{{ __sap_general_preconfig __sap_general_preconfigure_max_repo_type_string_9_9: '' __sap_general_preconfigure_max_repo_type_string_9_10: '' -__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_distribution_version | replace(\".\", \"_\")) }}" +__sap_general_preconfigure_max_repo_type_string: "{{ lookup('vars', '__sap_general_preconfigure_max_repo_type_string_' + ansible_facts['distribution_version'] | replace(\".\", \"_\")) }}" __sap_general_preconfigure_req_os_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-baseos-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-appstream-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_netweaver_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-netweaver-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_hana_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-sap-solutions-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_req_ha_repos: - - rhel-{{ ansible_distribution_major_version }}-for-{{ ansible_architecture }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms + - rhel-{{ ansible_facts['distribution_major_version'] }}-for-{{ ansible_facts['architecture'] }}-highavailability-{{ __sap_general_preconfigure_max_repo_type_string }}rpms __sap_general_preconfigure_envgroups: - "server-product-environment" @@ -51,7 +51,7 @@ __sap_general_preconfigure_packagegroups_ppc64le: __sap_general_preconfigure_packagegroups_s390x: - "@server" -__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_architecture) }}" +__sap_general_preconfigure_packagegroups: "{{ lookup('vars', '__sap_general_preconfigure_packagegroups_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_packages_x86_64: - uuidd @@ -104,7 +104,7 @@ __sap_general_preconfigure_packages_s390x: - langpacks-en - glibc-langpack-en -__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" +__sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_facts['architecture']) }}" __sap_general_preconfigure_required_ppc64le: - ibm-power-managed-rhel9