Skip to content

Commit 7c53276

Browse files
committed
Fix all the newly detected yamllint warnings
Fix all warnings from yamllint: most of them are about indentation and yes/no --> true/false. Fix few Ansible lint warnings about FQDN names.
1 parent 772585e commit 7c53276

28 files changed

Lines changed: 214 additions & 222 deletions

ansible/roles/qe_sap_storage/defaults/main.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@ sap_storage_sap_type: 'sap_onehost'
1111
sap_storage_action: 'prepare'
1212
# prepare | remove
1313

14-
1514
# Azure variables
16-
1715
sap_storage_az_imds_json:
1816
sap_storage_az_imds_url: 'http://169.254.169.254/metadata/instance/compute?api-version=2020-09-01'
1917
sap_storage_az_vmsize_url: 'http://169.254.169.254/metadata/instance/compute/vmSize?api-version=2017-08-01&format=text'
20-
2118
sap_storage_az_vmsize:
22-
2319
sap_storage_az_lun: '/dev/disk/azure/scsi1/lun'
2420

2521
# AWS variables
26-
27-
sap_storage_aws_imds_url:
28-
sap_storage_aws_vmsize_url:
29-
22+
sap_storage_aws_imds_url:
23+
sap_storage_aws_vmsize_url:
3024
sap_storage_aws_vmsize:
3125

3226
# IBM Cloud variables

ansible/roles/qe_sap_storage/meta/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ galaxy_info:
77
min_ansible_version: 2.9
88
platforms:
99
- name: EL
10-
versions: [ 7, 8, 9 ]
10+
versions: [7, 8, 9]
1111
- name: SLES
12-
versions: [ 15SP3 ]
13-
galaxy_tags: [ 'sap', 'rhel', 'redhat', 'sles', 'suse' ]
12+
versions: [15SP3]
13+
galaxy_tags: ['sap', 'rhel', 'redhat', 'sles', 'suse']
1414
dependencies: []

ansible/roles/qe_sap_storage/tasks/az_main.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@
77
# Create json format of IMDS
88
# Todo: Ansibilize this
99
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - Create json format of IMDS
10-
shell: |
10+
ansible.builtin.shell: |
1111
curl -H Metadata:true --noproxy "*" "{{ sap_storage_az_imds_url }}" | python3 -mjson.tool
1212
register: az_imds_reg
1313
args:
1414
executable: /bin/bash
1515
# If this fails, that means this VM is not Azure?
1616

17-
- set_fact:
18-
sap_storage_az_imds_json: "{{ az_imds_reg.stdout }}"
17+
- ansible.builtin.set_fact:
18+
sap_storage_az_imds_json: "{{ az_imds_reg.stdout }}"
1919

2020
# Pull VMSize
2121
# Todo: Ansibilize this
2222
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - Pull VMSize
23-
shell: |
23+
ansible.builtin.shell: |
2424
curl -H Metadata:true --noproxy "*" "{{ sap_storage_az_vmsize_url }}"
2525
register: az_vmsize_reg
2626
args:
2727
executable: /bin/bash
2828

29-
- debug:
30-
msg:
31-
- "{{ az_vmsize_reg.stdout }}"
29+
- ansible.builtin.debug:
30+
msg:
31+
- "{{ az_vmsize_reg.stdout }}"
3232

33-
- set_fact:
34-
sap_storage_az_vmsize: "{{ az_vmsize_reg.stdout }}"
33+
- ansible.builtin.set_fact:
34+
sap_storage_az_vmsize: "{{ az_vmsize_reg.stdout }}"
3535

3636
# Include vars depending on VM Size
3737
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - Load Variables for {{ sap_storage_az_vmsize }}
38-
include_vars: "{{ sap_storage_cloud_type }}_tasks/vmsizes/{{ sap_storage_az_vmsize }}.yml"
38+
ansible.builtin.include_vars: "{{ sap_storage_cloud_type }}_tasks/vmsizes/{{ sap_storage_az_vmsize }}.yml"

ansible/roles/qe_sap_storage/tasks/az_tasks/prepare_storage.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# Striped volume
44
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} - Striped
55
block:
6-
6+
77
# Get LUNs from metadata
88
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Get LUNs from metadata
9-
shell: |
9+
ansible.builtin.shell: |
1010
for i in {1..{{ item.value.numluns }}}
1111
do
1212
{{ item.value.vg }}${i}lun="{{ sap_storage_az_lun }} \
@@ -20,26 +20,26 @@
2020
args:
2121
executable: /bin/bash
2222
register: pvs_reg
23-
24-
- set_fact:
23+
24+
- ansible.builtin.set_fact:
2525
pvs_list: "{{ pvs_reg.stdout.split() }}"
2626

2727
# Create Volume Group
2828
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Volume Group Striped
29-
lvg:
29+
community.general.lvg:
3030
vg: "{{ item.value.vg }}"
3131
pvs: "{{ pvs_list | join(',') }}"
32-
force: yes
32+
force: true
3333

3434
# Create Logical Group
3535
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Logical Volume - Striped
36-
lvol:
36+
community.general.lvol:
3737
vg: "{{ item.value.vg }}"
3838
lv: "{{ item.value.lv }}"
3939
size: 100%VG
4040
opts: "-i{{ item.value.numluns }} -I{{ item.value.stripesize }}"
4141

42-
when:
42+
when:
4343
- "item.value.numluns != '1'"
4444

4545
# Single volume
@@ -48,7 +48,7 @@
4848

4949
# Get LUNs from metadata
5050
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Get LUNs from metadata
51-
shell: |
51+
ansible.builtin.shell: |
5252
{{ item.value.vg }}lun="{{ sap_storage_az_lun }} \
5353
`awk '/caching/ { r=""; f=1 } f { r = (r ? r ORS : "") $0 } \
5454
/writeAcceleratorEnabled/ \
@@ -60,35 +60,35 @@
6060
executable: /bin/bash
6161
register: pvs_reg
6262

63-
- set_fact:
63+
- ansible.builtin.set_fact:
6464
pvs_one: "{{ pvs_reg.stdout }}"
6565

6666
# Create Volume Group
6767
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Volume Group One
68-
lvg:
68+
community.general.lvg:
6969
vg: "{{ item.value.vg }}"
7070
pvs: "{{ pvs_one }}"
71-
force: yes
71+
force: true
7272

7373
# Create Logical Group
7474
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Logical Volume - One
75-
lvol:
75+
community.general.lvol:
7676
vg: "{{ item.value.vg }}"
7777
lv: "{{ item.value.lv }}"
7878
size: 100%VG
7979

80-
when:
80+
when:
8181
- "item.value.numluns == '1'"
8282

8383
# Create Filesystem
8484
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Filesystem
85-
filesystem:
85+
community.general.filesystem:
8686
fstype: xfs
8787
dev: "/dev/{{ item.value.vg }}/{{ item.value.lv }}"
8888

8989
# Mount Filesystem
9090
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ sap_storage_az_vmsize }} - {{ item.value.name }} Mount
91-
mount:
91+
ansible.posix.mount:
9292
path: "{{ item.value.directory }}"
9393
fstype: xfs
9494
src: "/dev/mapper/{{ item.value.vg }}-{{ item.value.lv }}"

ansible/roles/qe_sap_storage/tasks/az_tasks/remove_storage.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
# Unmount Filesystem
44
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Unmount Filesystem
5-
mount:
5+
ansible.posix.mount:
66
path: "{{ item.value.directory }}"
77
state: absent
88

99
# Remove Filesystem
1010
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Filesystem
11-
shell: |
11+
ansible.builtin.shell: |
1212
/sbin/wipefs --all -f /dev/mapper/{{ item.value.vg }}-{{ item.value.lv }}
1313
1414
# Remove Logical Volume
1515
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Logical Volume
16-
lvol:
16+
community.general.lvol:
1717
lv: "{{ item.value.lv }}"
1818
vg: "{{ item.value.vg }}"
1919
state: absent
20-
force: yes
20+
force: true
2121

2222
# Remove Volume Group
2323
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Volume Group
24-
lvg:
24+
community.general.lvg:
2525
vg: "{{ item.value.vg }}"
2626
state: absent
27-
force: yes
27+
force: true

ansible/roles/qe_sap_storage/tasks/generic_tasks/prepare_storage.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
---
22

3-
- debug:
3+
- ansible.builtin.debug:
44
msg: "{{ item }} "
55

66
# Create Volume Group
77
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Volume Group One
8-
lvg:
8+
community.general.lvg:
99
vg: "{{ item.value.vg }}"
1010
pvs: "{{ item.value.pv }}"
11-
force: yes
11+
force: true
1212

1313
# Create Logical Group - One
1414
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Logical Volume - One
15-
lvol:
15+
community.general.lvol:
1616
vg: "{{ item.value.vg }}"
1717
lv: "{{ item.value.lv }}"
1818
size: 100%VG
19-
when:
19+
when:
2020
- "item.value.numluns == '1'"
2121

2222
# Create Logical Group - Striped
2323
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Logical Volume - Striped
24-
lvol:
24+
community.general.lvol:
2525
vg: "{{ item.value.vg }}"
2626
lv: "{{ item.value.lv }}"
2727
size: 100%VG
2828
opts: "-i {{ item.value.numluns }} -I {{ item.value.stripesize }}"
29-
when:
29+
when:
3030
- "item.value.numluns != '1'"
3131

3232
# Create Filesystem
3333
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Filesystem
34-
filesystem:
34+
community.general.filesystem:
3535
fstype: xfs
3636
dev: "/dev/{{ item.value.vg }}/{{ item.value.lv }}"
3737

3838
# Mount Filesystem
3939
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Mount
40-
mount:
40+
ansible.posix.mount:
4141
path: "{{ item.value.directory }}"
4242
fstype: xfs
4343
src: "/dev/mapper/{{ item.value.vg }}-{{ item.value.lv }}"

ansible/roles/qe_sap_storage/tasks/generic_tasks/remove_storage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Filesystem
1919
shell: |
2020
/sbin/wipefs --all -f /dev/mapper/{{ item.value.vg }}-{{ item.value.lv }}
21-
ignore_errors: yes
21+
ignore_errors: true
2222

2323
# Remove Logical Volume
2424
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Logical Volume
2525
lvol:
2626
lv: "{{ item.value.lv }}"
2727
vg: "{{ item.value.vg }}"
2828
state: absent
29-
force: yes
29+
force: true
3030

3131
# Remove Volume Group
3232
- name: SAP Storage Preparation - {{ sap_storage_cloud_type | upper }} - {{ item.value.name }} Remove Volume Group
3333
lvg:
3434
vg: "{{ item.value.vg }}"
3535
state: absent
36-
force: yes
36+
force: true

ansible/roles/sap_ha_install_hana_hsr/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ sap_ha_install_hana_hsr_fqdn: "{{ sap_domain }}"
99
sap_ha_install_hana_hsr_rep_mode: sync
1010
sap_ha_install_hana_hsr_oper_mode: logreplay
1111

12-
sap_ha_install_hana_hsr_update_etchosts: yes
12+
sap_ha_install_hana_hsr_update_etchosts: true

ansible/roles/sap_ha_install_hana_hsr/tasks/update_etchosts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
path: /etc/hosts
99
create: true
1010
state: present
11-
backup: yes
11+
backup: true
1212
line: "{{ item.node_ip }}\t{{ item.node_name }}.{{ sap_ha_install_hana_hsr_fqdn }}\t{{ item.node_name }}"
1313
regexp: (?i)^\s*{{ item.node_ip }}\s+{{ item.node_name }}
1414
loop: "{{ sap_ha_install_hana_hsr_cluster_nodes }}"

0 commit comments

Comments
 (0)