commit f011979fa05e938165c95a134bbdcc37a33f4eea Author: Bernd Finger Date: Sat Aug 1 01:28:00 2020 +0200 114: remove all trailing whitespaces diff --git a/handlers/main.yml b/handlers/main.yml index 543d238..b3dbdec 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -19,7 +19,7 @@ command: grub2-mkconfig -o /boot/grub2/grub.cfg register: command_result listen: "Regenerate grub2 conf handler" - when: + when: - not efi_exists.stat.exists - sap_hana_preconfigure_run_grub2_mkconfig|d(true) diff --git a/tasks/RedHat/configuration.yml b/tasks/RedHat/configuration.yml index 04bb486..0d77b5d 100644 --- a/tasks/RedHat/configuration.yml +++ b/tasks/RedHat/configuration.yml @@ -5,7 +5,7 @@ # verbosity: "{{ debuglevel }}" # - name: list of required SAP Notes - debug: + debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) # We want to disable firewalld, so we need to check if firewalld is installed @@ -13,10 +13,10 @@ package_facts: manager: auto -- name: include configuration actions for required sapnotes +- name: include configuration actions for required sapnotes include_tasks: "sapnote/{{ item }}.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" - + - include_tasks: "{{ './' + ansible_distribution + '_' + ansible_distribution_major_version + '/recommendations.yml' }}" ... diff --git a/tasks/RedHat/generic/configure-tuned.yml b/tasks/RedHat/generic/configure-tuned.yml index ce66b31..50b8752 100644 --- a/tasks/RedHat/generic/configure-tuned.yml +++ b/tasks/RedHat/generic/configure-tuned.yml @@ -22,7 +22,7 @@ block: - name: Switch to tuned profile sap-hana if not currently active command: /usr/sbin/tuned-adm profile sap-hana - + - name: Show active tuned profile command: bash -lc "/usr/sbin/tuned-adm active | grep ":" | cut -d ":" -f 2 | awk '{$1=$1;print}'" register: new_profile @@ -67,7 +67,7 @@ block: - name: Switch to tuned profiles sap-hana sap-hana-ppc64le if not currently active command: /usr/sbin/tuned-adm profile sap-hana sap-hana-ppc64le - + - name: Show active tuned profile command: bash -lc "/usr/sbin/tuned-adm active | grep ":" | cut -d ":" -f 2 | awk '{$1=$1;print}'" register: new_profile_ppc64le diff --git a/tasks/RedHat/generic/disable-coredumps.yml b/tasks/RedHat/generic/disable-coredumps.yml index 640a60c..a40a4c5 100644 --- a/tasks/RedHat/generic/disable-coredumps.yml +++ b/tasks/RedHat/generic/disable-coredumps.yml @@ -4,11 +4,11 @@ msg: "imported RedHat/generic/disable-coredumps.yml" - name: disable core file creation for all users - pam_limits: + pam_limits: dest: /etc/security/limits.d/99-sap.conf - domain: "*" - limit_item: core - limit_type: "{{ line_item }}" + domain: "*" + limit_item: core + limit_type: "{{ line_item }}" value: '0' with_items: - hard diff --git a/tasks/RedHat/installation.yml b/tasks/RedHat/installation.yml index ec6e546..9bd3dfa 100644 --- a/tasks/RedHat/installation.yml +++ b/tasks/RedHat/installation.yml @@ -21,7 +21,7 @@ state: present when: sap_hana_preconfigure_enable_sap_hana_repos - + - name: Detect if the minor RHEL release is set shell: subscription-manager release --show | awk '{print $NF}' register: subscription_manager_release_result @@ -131,7 +131,7 @@ when: sap_hana_preconfigure_fact_minpkglist | d([]) # when: not ( sap_hana_preconfigure_fact_minpkglist == [ "" ] ) - when: + when: - sap_hana_preconfigure_min_package_check|bool - __sap_hana_preconfigure_min_pkgs | d([]) # - not( (__sap_hana_preconfigure_min_pkgs is undefined) or (__sap_hana_preconfigure_min_pkgs is none) or (__sap_hana_preconfigure_min_pkgs | trim == '') ) diff --git a/tasks/RedHat_7/recommendations.yml b/tasks/RedHat_7/recommendations.yml index 80a8eb0..fefa213 100644 --- a/tasks/RedHat_7/recommendations.yml +++ b/tasks/RedHat_7/recommendations.yml @@ -3,11 +3,11 @@ ## This creates the SAP Users in case you define them in your playbook ## This has been done for providers who want to create the SAP users before handing ## over the image to clients -- name: ensure sapadm group and sapadm user is created +- name: ensure sapadm group and sapadm user is created block: - - name: ensure sapdm user exists - group: - name: sapsys + - name: ensure sapdm user exists + group: + name: sapsys gid: "{{ sap_sapsys_gid }}" - name: ensure sapadm user exists user: @@ -19,7 +19,7 @@ - sap_sapsys_gid is defined - sap_sapadm_uid is defined - sap_sapadm_pw_clear is defined - + ### Disable tempfile handling, otherwise things are gone after reboot # already in sap-preconfigure, sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml # - name: disable temp file handling for SAP applications diff --git a/tasks/RedHat_8/recommendations.yml b/tasks/RedHat_8/recommendations.yml index f3ba349..382eda1 100644 --- a/tasks/RedHat_8/recommendations.yml +++ b/tasks/RedHat_8/recommendations.yml @@ -3,11 +3,11 @@ ## Most of this is described in SAP Note 2009879 ## TODO: Next task should be moved to sap-deploy, or sap-hostagent install ! -- name: ensure sapsys group and sapadm user are created +- name: ensure sapsys group and sapadm user are created block: - - name: ensure sapsys group exists - group: - name: sapsys + - name: ensure sapsys group exists + group: + name: sapsys gid: "{{ sap_sapsys_gid }}" - name: ensure sapadm user exists user: @@ -20,7 +20,6 @@ - sap_sapsys_gid is defined - sap_sapadm_uid is defined - sap_sapadm_pw_clear is defined - ### Firewall Settings can only be done if SAP instance ID is known, ### otherwise disable firewall diff --git a/tasks/SLES/configuration.yml b/tasks/SLES/configuration.yml index b0b4503..f665c73 100644 --- a/tasks/SLES/configuration.yml +++ b/tasks/SLES/configuration.yml @@ -5,13 +5,13 @@ # verbosity: "{{ debuglevel }}" # - name: list of required SAP Notes - debug: + debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: include configuration actions for required sapnotes +- name: include configuration actions for required sapnotes include_tasks: "sapnotes/{{ item }}/configuration.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" - + - include_tasks: "{{ './' + ansible_distribution + ansible_distribution_major_version + '/recommendations.yml' }}" ... diff --git a/tasks/SLES/installation.yml b/tasks/SLES/installation.yml index d9b3472..fab2b34 100644 --- a/tasks/SLES/installation.yml +++ b/tasks/SLES/installation.yml @@ -5,11 +5,11 @@ # verbosity: "{{ debuglevel }}" # - name: list of required SAP Notes - debug: + debug: var: __sap_hana_preconfigure_sapnotes | difference(['']) -- name: include configuration actions for required sapnotes +- name: include configuration actions for required sapnotes include_tasks: "tasks/sapnote/{{ item }}/installation.yml" with_items: "{{ __sap_hana_preconfigure_sapnotes | difference(['']) }}" - + ... diff --git a/tasks/SLES15/recommendations.yml b/tasks/SLES15/recommendations.yml index 71fcd3b..821bb46 100644 --- a/tasks/SLES15/recommendations.yml +++ b/tasks/SLES15/recommendations.yml @@ -1,12 +1,11 @@ --- - ## TODO: Next task should be moved to sap-deploy, or sap-hostagent install ! -- name: ensure sapadm group and sapadm user is created +- name: ensure sapadm group and sapadm user is created block: - - name: ensure sapadm user exists - group: - name: sapsys + - name: ensure sapadm user exists + group: + name: sapsys gid: "{{ sap_sapsys_gid }}" - name: ensure sapadm user exists user: @@ -18,6 +17,5 @@ - sap_sapsys_gid is defined - sap_sapadm_uid is defined - sap_sapadm_pw_clear is defined - ... diff --git a/tasks/sapnote/1275776/configuration.yml b/tasks/sapnote/1275776/configuration.yml index 88e55f7..15d869c 100644 --- a/tasks/sapnote/1275776/configuration.yml +++ b/tasks/sapnote/1275776/configuration.yml @@ -14,7 +14,7 @@ - name: "1275776 - Configuration saptune sap note 1275776" command: "saptune note apply 1275776" - + - name: "1275776 - Configuration saptune sap note 1984787" command: "saptune note apply 1984787" diff --git a/tasks/sapnote/1944799/installation.yml b/tasks/sapnote/1944799/installation.yml index 385d727..9260ede 100644 --- a/tasks/sapnote/1944799/installation.yml +++ b/tasks/sapnote/1944799/installation.yml @@ -25,10 +25,9 @@ - name: "1944799 - PDF 8.1 Package List Packages" zypper: name: "{{ packages }}" - type: package + type: package vars: packages: - libssh2-1 - libopenssl1_0_0 ... - diff --git a/tasks/sapnote/2009879_7.yml b/tasks/sapnote/2009879_7.yml index c86b364..89dc1a5 100644 --- a/tasks/sapnote/2009879_7.yml +++ b/tasks/sapnote/2009879_7.yml @@ -25,7 +25,7 @@ with_items: - { src: 'libssl.so.1.0.1e', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.1.0.1e', dest: 'libcrypto.so.1.0.1' } - when: + when: ( ansible_distribution_version == '7.2' ) loop_control: loop_var: line_item @@ -35,7 +35,7 @@ with_items: - { src: 'libssl.so.10', dest: 'libssl.so.1.0.1' } - { src: 'libcrypto.so.10', dest: 'libcrypto.so.1.0.1' } - when: + when: ( ansible_distribution_version != '7.2' ) loop_control: loop_var: line_item diff --git a/tasks/sapnote/2055470.yml b/tasks/sapnote/2055470.yml index aa7da75..b958e52 100644 --- a/tasks/sapnote/2055470.yml +++ b/tasks/sapnote/2055470.yml @@ -36,7 +36,7 @@ when: not( (sap_hana_preconfigure_ppcle_tso_if is undefined) or (sap_hana_preconfigure_ppcle_tso_if is none) or (sap_hana_preconfigure_ppcle_tso_if | trim == '') ) loop_control: loop_var: line_item - + - name: add largesend parameter sysctl: sysctl_file: /etc/sysctl.d/ibm_largesend.conf diff --git a/tasks/sapnote/2382421.yml b/tasks/sapnote/2382421.yml index 794e728..3847edc 100644 --- a/tasks/sapnote/2382421.yml +++ b/tasks/sapnote/2382421.yml @@ -3,10 +3,10 @@ # SAP Note: 2382421 - Optimizing the Network Configuration on HANA- and OS-Level # - name: setting kernel tunables as in SAP NOTE 2382421 - sysctl: + sysctl: sysctl_file: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}" name: "{{ line_item.name }}" - value: "{{ line_item.value }}" + value: "{{ line_item.value }}" state: present sysctl_set: yes reload: yes diff --git a/tasks/sapnote/2578899/configuration.yml b/tasks/sapnote/2578899/configuration.yml index e554a2d..9f221cb 100644 --- a/tasks/sapnote/2578899/configuration.yml +++ b/tasks/sapnote/2578899/configuration.yml @@ -1,6 +1,6 @@ --- -- name: 2588899 - I/O scheduler +- name: 2588899 - I/O scheduler lineinfile: path: /etc/default/grub backup: yes diff --git a/tasks/sapnote/2578899/installation.yml b/tasks/sapnote/2578899/installation.yml index 28d798e..0c41def 100644 --- a/tasks/sapnote/2578899/installation.yml +++ b/tasks/sapnote/2578899/installation.yml @@ -10,7 +10,7 @@ - libopenssl1_0_0 -- name: 2578899 - sysstat - monitoring data +- name: 2578899 - sysstat - monitoring data package: name: "sysstat" diff --git a/tasks/sapnote/2684254/configuration.yml b/tasks/sapnote/2684254/configuration.yml index 53fd4d9..f7b9411 100644 --- a/tasks/sapnote/2684254/configuration.yml +++ b/tasks/sapnote/2684254/configuration.yml @@ -1,10 +1,10 @@ --- -- name: 2684254 - Increase UserTasksMax +- name: 2684254 - Increase UserTasksMax copy: dest: "/etc/systemd/logind.conf.d/sap.conf" content: | [Login] - UserTasksMax=infinity + UserTasksMax=infinity #- name: Turn off auto-numa balancing # sysctl: # sysctl_file: /etc/sysctl.d/sap_hana.conf diff --git a/tasks/sapnote/2684254/installation.yml b/tasks/sapnote/2684254/installation.yml index f24fb54..d669d01 100644 --- a/tasks/sapnote/2684254/installation.yml +++ b/tasks/sapnote/2684254/installation.yml @@ -8,7 +8,7 @@ package: name: "{{ packages }}" vars: - packages: + packages: - libopenssl1_0_0 - libssh2-1