Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
berndfinger committed Feb 18, 2021
1 parent 514b260 commit cc7812f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
6 changes: 4 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
- not sap_preconfigure_reboot_ok|d(false)

- name: Remount /dev/shm
command: bash -lc "mount -o remount /dev/shm"
command: mount -o remount /dev/shm
args:
warn: false
listen: __sap_preconfigure_mount_tmpfs_handler

- name: Check if /dev/shm is available
command: bash -lc "df -h /dev/shm"
command: df -h /dev/shm
register: __sap_preconfigure_command_df_shm_result
listen: __sap_preconfigure_mount_tmpfs_handler

Expand Down
8 changes: 4 additions & 4 deletions tasks/RedHat/generic/assert-etc-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# var=sap_hostname_aliases

- name: Check if ipv4 address, FQDN, and hostname are once in /etc/hosts
shell: awk 'BEGIN{a=0}/{{ sap_ip }}/&&/{{ sap_hostname }}.{{ sap_domain }}/&&/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts
command: awk 'BEGIN{a=0}/{{ sap_ip }}/&&/{{ sap_hostname }}.{{ sap_domain }}/&&/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts
register: __shell_01_result
ignore_errors: yes
changed_when: no
Expand All @@ -42,7 +42,7 @@
# - sap_preconfigure_assert_modify_etc_hosts | bool

- name: Check for duplicate entries of {{ sap_ip }} in /etc/hosts
shell: awk 'BEGIN{a=0}/{{ sap_ip }}/{a++}END{print a}' /etc/hosts
command: awk 'BEGIN{a=0}/{{ sap_ip }}/{a++}END{print a}' /etc/hosts
register: __shell_02_result
ignore_errors: yes
changed_when: no
Expand All @@ -55,7 +55,7 @@
ignore_errors: "{{ sap_preconfigure_assert_ignore_errors|d(false) }}"

- name: Check for duplicate entries of {{ sap_hostname }}.{{ sap_domain }} in /etc/hosts
shell: awk 'BEGIN{a=0}/{{ sap_hostname }}.{{ sap_domain }}/{a++}END{print a}' /etc/hosts
command: awk 'BEGIN{a=0}/{{ sap_hostname }}.{{ sap_domain }}/{a++}END{print a}' /etc/hosts
register: __shell_03_result
ignore_errors: yes
changed_when: no
Expand All @@ -68,7 +68,7 @@
ignore_errors: "{{ sap_preconfigure_assert_ignore_errors|d(false) }}"

- name: Check for duplicate entries of {{ sap_hostname }} in /etc/hosts
shell: awk 'BEGIN{a=0}/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts
command: awk 'BEGIN{a=0}/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts
register: __shell_04_result
ignore_errors: yes
changed_when: no
Expand Down
8 changes: 4 additions & 4 deletions tasks/RedHat/generic/assert-process-resource-limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
- __stat_limits_sap_conf.stat.isreg

- name: Get the hard limit of nofile for the database group
command: "awk '/@{{ sap_preconfigure_db_group_name }}/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf"
command: awk '/@{{ sap_preconfigure_db_group_name }}/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf
register: __sap_conf_db_group_nofile_hard_result
changed_when: no
ignore_errors: yes
Expand All @@ -83,7 +83,7 @@
- sap_preconfigure_db_group_name is defined

- name: Get the soft limit of nofile for the database group
command: "awk '/@{{ sap_preconfigure_db_group_name }}/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf"
command: awk '/@{{ sap_preconfigure_db_group_name }}/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf
register: __sap_conf_db_group_nofile_soft_result
changed_when: no
ignore_errors: yes
Expand Down Expand Up @@ -142,7 +142,7 @@
- __stat_limits_sap_conf.stat.isreg

- name: Get the hard limit of nproc for the database group
command: "awk '/@{{ sap_preconfigure_db_group_name }}/&&/nproc/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf"
command: awk '/@{{ sap_preconfigure_db_group_name }}/&&/nproc/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf
register: __sap_conf_db_group_nproc_hard_result
changed_when: no
ignore_errors: yes
Expand All @@ -163,7 +163,7 @@
- sap_preconfigure_db_group_name is defined

- name: Get the soft limit of nproc for the database group
command: "awk '/@{{ sap_preconfigure_db_group_name }}/&&/nproc/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf"
command: awk '/@{{ sap_preconfigure_db_group_name }}/&&/nproc/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf
register: __sap_conf_db_group_nproc_soft_result
changed_when: no
ignore_errors: yes
Expand Down
2 changes: 1 addition & 1 deletion tasks/RedHat/generic/configure-etc-hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- name: Check if ipv4 address, FQDN, and hostname are in /etc/hosts
block:
- name: Perform the /etc/hosts completeness check
command: bash -lc "awk 'BEGIN{a=0}/{{ sap_ip }}/&&/{{ sap_hostname }}.{{ sap_domain }}/&&/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts"
command: awk 'BEGIN{a=0}/{{ sap_ip }}/&&/{{ sap_hostname }}.{{ sap_domain }}/&&/{{ sap_hostname }}/{a++}END{print a}' /etc/hosts
register: command_result
changed_when: false
- debug:
Expand Down
4 changes: 2 additions & 2 deletions tasks/sapnote/2002167/04-assert-linux-kernel-parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
- __stat_sysctl_sap_conf.stat.isreg

- name: Get vm.max_map_count value from sysctl
shell: sysctl -n vm.max_map_count
command: sysctl -n vm.max_map_count
register: __sysctl_max_map_count_result
changed_when: no

Expand All @@ -57,7 +57,7 @@
ignore_errors: "{{ sap_preconfigure_assert_ignore_errors|d(false) }}"

- name: Get kernel.sem from /etc/sysctl.d/sap.conf
shell: awk 'BEGIN{FS="="}/kernel.sem/{split ($2, a, " "); print a[1], a[2], a[3], a[4]}' /etc/sysctl.d/sap.conf
command: awk 'BEGIN{FS="="}/kernel.sem/{split ($2, a, " "); print a[1], a[2], a[3], a[4]}' /etc/sysctl.d/sap.conf
register: __sap_conf_kernel_sem_result
changed_when: no
ignore_errors: yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
- __stat_sysctl_sap_conf.stat.isreg

- name: Get vm.max_map_count value from sysctl
shell: sysctl -n vm.max_map_count
command: sysctl -n vm.max_map_count
register: __sysctl_max_map_count_result
changed_when: no

Expand Down

0 comments on commit cc7812f

Please sign in to comment.