Skip to content

Commit

Permalink
Merge pull request #811 from berndfinger/issue-810-yaml-octal-values
Browse files Browse the repository at this point in the history
collection: Modify for latest yamllint requirements
  • Loading branch information
berndfinger authored Jul 19, 2024
2 parents 307d8b0 + 3cbff04 commit 48031f0
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 20 deletions.
7 changes: 6 additions & 1 deletion .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ rules:
brackets: {max-spaces-inside: 1, level: error}
# colons: {max-spaces-after: -1, level: error}
# commas: {max-spaces-after: -1, level: error}
comments: disable
comments:
require-starting-space: false
min-spaces-from-content: 1
comments-indentation: disable
# document-start: disable
# empty-lines: {max: 3, level: error}
Expand All @@ -19,3 +21,6 @@ rules:
# new-lines: {type: unix}
# trailing-spaces: disable
truthy: disable
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ansible.builtin.lineinfile:
path: /etc/security/limits.d/99-sap.conf
create: yes
mode: 0644
mode: "0644"
regexp: '^@sapsys\s+{{ line_item }}\s+nofile\s.*'
line: "@sapsys\t{{ line_item }}\tnofile\t1048576"
with_items:
Expand All @@ -26,7 +26,7 @@
ansible.builtin.lineinfile:
path: /etc/security/limits.d/99-sap.conf
create: yes
mode: 0644
mode: "0644"
regexp: '^@{{ sap_general_preconfigure_db_group_name }}\s+{{ line_item }}\s+nofile\s.*'
line: "@{{ sap_general_preconfigure_db_group_name }}\t{{ line_item }}\tnofile\t1048576"
with_items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ansible.builtin.lineinfile:
path: /etc/security/limits.d/99-sap.conf
create: yes
mode: 0644
mode: "0644"
regexp: '^@sapsys\s+{{ line_item }}\s+nproc\s.*'
line: "@sapsys\t{{ line_item }}\tnproc\tunlimited"
with_items:
Expand All @@ -26,7 +26,7 @@
ansible.builtin.lineinfile:
path: /etc/security/limits.d/99-sap.conf
create: yes
mode: 0644
mode: "0644"
regexp: '^@{{ sap_general_preconfigure_db_group_name }}\s+{{ line_item }}\s+nproc\s.*'
line: "@{{ sap_general_preconfigure_db_group_name }}\t{{ line_item }}\tnproc\tunlimited"
with_items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ansible.builtin.file:
path: "{{ __sap_hana_install_tmp_software_extract_directory }}"
state: directory
mode: 0755
mode: "0755"
owner: root
group: root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
src: "{{ __sap_hana_install_fact_software_directory }}/{{ item }}"
dest: "{{ sap_hana_install_software_extract_directory }}/sarfiles/{{ item }}"
remote_src: true
mode: 0755
mode: "0755"
owner: root
group: root
with_items: "{{ __sap_hana_install_fact_sarfiles }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ansible.builtin.file:
path: /etc/rc.d/rc.local
state: touch
mode: 0644
mode: "0644"

- name: Configure CPU Governor for performance at boot time (x86_64 platform only)
ansible.builtin.lineinfile:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
ansible.builtin.file:
path: /etc/init.d/boot.local
state: touch
mode: 0755
mode: "0755"

- name: Configure EPB at boot time
ansible.builtin.lineinfile:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ansible.builtin.lineinfile:
path: /etc/security/limits.d/99-sap.conf
create: yes
mode: 0644
mode: "0644"
regexp: '^\*\s+{{ line_item }}\s+core\s.*'
line: "*\t{{ line_item }}\tcore\t0"
with_items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ansible.builtin.file:
path: /etc/init.d/boot.local
state: touch
mode: 0755
mode: "0755"
when: not __sap_hana_preconfigure_register_stat_boot_local_ksm.stat.exists

- name: Disable KSM at boot time
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_hana_preconfigure/tasks/sapnote/2055470.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
ansible.builtin.lineinfile:
path: /etc/sysctl.d/ibm_largesend.conf
create: yes
mode: 0644
mode: "0644"
regexp: ^{{ line_item.name }}.*
line: "{{ line_item.name }}={{ line_item.value }}"
state: present
Expand Down
6 changes: 3 additions & 3 deletions roles/sap_hana_preconfigure/tasks/sapnote/2382421.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ansible.builtin.lineinfile:
path: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}"
create: yes
mode: 0644
mode: "0644"
regexp: ^{{ line_item.name }}.*
line: "{{ line_item.name }}={{ line_item.value }}"
state: present
Expand Down Expand Up @@ -53,7 +53,7 @@
ansible.builtin.lineinfile:
path: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}"
create: yes
mode: 0644
mode: "0644"
regexp: ^net.core.wmem_max.*
line: "net.core.wmem_max={{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_wmem.stdout.split()[-1] }}"
state: present
Expand All @@ -62,7 +62,7 @@
ansible.builtin.lineinfile:
path: "{{ __sap_hana_preconfigure_etc_sysctl_saphana_conf }}"
create: yes
mode: 0644
mode: "0644"
regexp: ^net.core.rmem_max.*
line: "net.core.rmem_max={{ __sap_hana_preconfigure_register_sysctl_ipv4_tcp_rmem.stdout.split()[-1] }}"
state: present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
- name: "Energy Performance Bias (EPB, applies to Intel-based systems only)"
ansible.builtin.lineinfile:
path: /etc/init.d/boot.local
mode: 0744
mode: "0744"
line: 'cpupower set -b 0'
state: present
create: yes

- name: Kernel samepage merging (KSM)
ansible.builtin.lineinfile:
dest: /etc/init.d/boot.local
mode: 0744
mode: "0744"
line: echo 0 > /sys/kernel/mm/ksm/run
state: present
create: yes
4 changes: 2 additions & 2 deletions roles/sap_hana_preconfigure/tasks/sapnote/3024346.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ansible.builtin.lineinfile:
path: "{{ __sap_hana_preconfigure_etc_sysctl_netapp_hana_conf }}"
create: yes
mode: 0644
mode: "0644"
regexp: ^{{ line_item.name }}.*
line: "{{ line_item.name }}={{ line_item.value }}"
state: present
Expand Down Expand Up @@ -54,7 +54,7 @@
ansible.builtin.lineinfile:
path: /etc/modprobe.d/sunrpc.conf
create: yes
mode: 0644
mode: "0644"
regexp: '^options sunrpc tcp_max_slot_table_entries'
line: options sunrpc tcp_max_slot_table_entries=128
when: sap_hana_preconfigure_use_netapp_settings_nfsv3
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- name: SAP Storage Setup - (swap file) Adjust file permissions
ansible.builtin.file:
path: "{{ swap_file.swap_path }}"
mode: 0600
mode: "0600"

- name: SAP Storage Setup - (swap file) Create and activate swap
ansible.builtin.shell: |
Expand Down

0 comments on commit 48031f0

Please sign in to comment.