commit d52feb6262501f0723b67fc06c38ca0019d6d31d Author: Bernd Finger Date: Thu Nov 17 13:27:00 2022 +0100 preconfigure roles: Solve issue #246 diff --git a/roles/sap_general_preconfigure/handlers/main.yml b/roles/sap_general_preconfigure/handlers/main.yml index 47ad190..8d43fdf 100644 --- a/roles/sap_general_preconfigure/handlers/main.yml +++ b/roles/sap_general_preconfigure/handlers/main.yml @@ -26,8 +26,6 @@ - name: Remount /dev/shm ansible.builtin.command: mount -o remount /dev/shm - args: - warn: false listen: __sap_general_preconfigure_mount_tmpfs_handler - name: Check if /dev/shm is available diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index da8233f..9f0e8cf 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -229,9 +229,8 @@ - name: Get info about possible package updates ansible.builtin.command: yum check-update register: __sap_general_preconfigure_register_yum_check_update_assert - args: - warn: false changed_when: false + no_log: true ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update @@ -278,8 +277,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_needs_restarting_command_assert }}" register: __sap_general_preconfigure_register_needs_restarting_assert changed_when: false - args: - warn: false check_mode: false ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 1600940..8471acf 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -78,8 +78,6 @@ - name: Get list of enabled repositories ansible.builtin.command: "yum repolist" # noqa command-instead-of-module register: __sap_general_preconfigure_register_yum_repolist - args: - warn: false changed_when: false - name: Display the list of enabled repositories diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index 647c5df..53f4446 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -81,8 +81,6 @@ - name: Get info about possible package updates ansible.builtin.command: yum check-update register: __sap_general_preconfigure_register_yum_check_update_assert - args: - warn: false changed_when: false ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" when: sap_general_preconfigure_update diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml index 8d72936..64eb3f7 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml @@ -170,9 +170,8 @@ - name: Get info about possible package updates ansible.builtin.command: yum check-update register: __sap_hana_preconfigure_register_yum_check_update_assert - args: - warn: false changed_when: false + no_log: true ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" when: sap_hana_preconfigure_update diff --git a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml index e84302a..8b2133f 100644 --- a/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml +++ b/roles/sap_hana_preconfigure/tasks/sapnote/2292690/10-assert-ibm-energyscale.yml @@ -14,8 +14,6 @@ register: __sap_hana_preconfigure_register_yum_pseries_energy_assert changed_when: no ignore_errors: yes - args: - warn: false - name: Assert that package pseries-energy is not installed ansible.builtin.assert: diff -up community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml.me community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml --- community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml.me 2022-11-24 16:09:30.351779764 +0100 +++ community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml 2022-11-24 16:09:51.607092047 +0100 @@ -103,8 +103,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_yum_group_list_installed_command_assert }}" register: __sap_general_preconfigure_register_yum_group_assert changed_when: no - args: - warn: false - name: Assert that all required RHEL 7 package groups are installed ansible.builtin.assert: @@ -134,8 +132,6 @@ ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_yum_envgroup_list_installed_command_assert }}" register: __sap_general_preconfigure_register_yum_envgroup_assert changed_when: no - args: - warn: false - name: Assert that all required RHEL 8 environment groups are installed ansible.builtin.assert: diff -up community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/installation.yml.me community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/installation.yml --- community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/installation.yml.me 2022-11-24 15:39:24.083358360 +0100 +++ community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_general_preconfigure/tasks/RedHat/installation.yml 2022-11-24 16:09:16.734569938 +0100 @@ -104,10 +104,9 @@ - sap_general_preconfigure_set_minor_release - __sap_general_preconfigure_register_subscription_manager_release.stdout != ansible_distribution_version -- name: Ensure that the required package groups are installed, RHEL 7 +# Reason for noqa: The yum module appears to not support the check-update option +- name: Ensure that the required package groups are installed, RHEL 7 # noqa command-instead-of-module ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups|join(' ') }} -y" - args: - warn: false register: __sap_general_preconfigure_register_yum_group_install when: ansible_distribution_major_version == '7' @@ -116,11 +115,11 @@ var: __sap_general_preconfigure_register_yum_group_install when: ansible_distribution_major_version == '7' -- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 +# Reason for noqa: The yum module appears to not support the check-update option +- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 # noqa command-instead-of-module # Note: We want to avoid unwanted package upgrades, see bug 1983749. + ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups|join(' ') }} --nobest --exclude=kernel* -y" - args: - warn: false register: __sap_general_preconfigure_register_yum_group_install when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9' @@ -229,8 +228,6 @@ register: __sap_general_preconfigure_register_needs_restarting ignore_errors: true changed_when: false - args: - warn: false check_mode: false - name: Display the output of the reboot requirement check diff -up community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml.me community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml --- community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml.me 2022-11-24 16:29:58.053514750 +0100 +++ community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/assert-installation.yml 2022-11-24 16:30:25.886020641 +0100 @@ -85,8 +85,6 @@ ansible.builtin.shell: set -o pipefail && yum info installed {{ __sap_hana_preconfigure_required_ppc64le | map('quote') | join(' ') }} | awk '/Name/{n=$NF}/Version/{v=$NF}/Release/{r=$NF}/Description/{printf ("%s\n", n)}' register: __sap_hana_preconfigure_register_required_ppc64le_packages_assert changed_when: no - args: - warn: false - name: Assert that all required IBM packages are installed ansible.builtin.assert: @@ -223,8 +221,6 @@ ansible.builtin.shell: "{{ __sap_hana_preconfigure_fact_needs_restarting_command_assert }}" register: __sap_hana_preconfigure_register_needs_restarting_assert changed_when: false - args: - warn: false check_mode: false ignore_errors: "{{ sap_hana_preconfigure_assert_ignore_errors | d(false) }}" diff -up community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml.me community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml --- community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml.me 2022-11-24 16:29:34.036071972 +0100 +++ community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_hana_preconfigure/tasks/RedHat/installation.yml 2022-11-24 16:29:47.668325538 +0100 @@ -205,8 +205,6 @@ register: __sap_hana_preconfigure_register_needs_restarting ignore_errors: true changed_when: false - args: - warn: false check_mode: false - name: Display the output of the reboot requirement check diff -up community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml.me community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml --- community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml.me 2022-11-24 16:11:35.901018559 +0100 +++ community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_ha_prepare_pacemaker/tasks/software_setup.yml 2022-11-24 16:29:19.834807820 +0100 @@ -4,7 +4,6 @@ yum repolist args: executable: /bin/bash - warn: no become: true become_user: root register: sap_ha_prepare_pacemaker_check_ha_repos diff -up community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml.me community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml --- community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml.me 2022-11-24 16:10:14.505495496 +0100 +++ community.sap_install-a2c6785d02092bb9142d9f2c170ad4b097d1af2f/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml 2022-11-24 16:10:52.338204907 +0100 @@ -12,12 +12,11 @@ loop_var: line_item ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" -- name: Check if required packages for Adobe Document Services are installed +# Reason for noqa: The yum module appears to not support the check-update option +- name: Check if required packages for Adobe Document Services are installed # noqa command-instead-of-module ansible.builtin.shell: rpm -q --qf "%{NAME}.%{ARCH}\n" {{ __sap_netweaver_preconfigure_adobe_doc_services_packages | map('quote') | join(' ') }} register: __sap_netweaver_preconfigure_register_rpm_q_ads_packages changed_when: no - args: - warn: false when: sap_netweaver_preconfigure_use_adobe_doc_services | d(false) ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"