Skip to content

Commit c177427

Browse files
committed
Fix trivial ansible lint warnings
1 parent f5eafbf commit c177427

11 files changed

Lines changed: 24 additions & 24 deletions

ansible/playbooks/additional_fence_agent_tasks.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77

88
tasks:
99
- name: Verify installation
10-
command: "rpm -qf $(which fence_azure_arm)"
10+
ansible.builtin.shell: "rpm -qf $(which fence_azure_arm)"
1111
args:
1212
_uses_shell: true
1313
register: verify_installation
1414

1515
- name: Display verification result
16-
debug:
16+
ansible.builtin.debug:
1717
var: verify_installation.stdout_lines
1818

1919
- name: Install additional Python packages
20-
zypper:
20+
community.general.zypper:
2121
name:
2222
- python311-pexpect
2323
- python311-pycurl

ansible/playbooks/ptf_installation.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
tasks:
1414

1515
- name: Create directory for PTF installation
16-
file:
16+
ansible.builtin.file:
1717
path: "{{ ptf_dir }}"
1818
state: directory
1919
mode: '0755'
2020

2121
- name: Convert comma-separated string to list
22-
set_fact:
22+
ansible.builtin.set_fact:
2323
az_blobs: "{{ ptf_files | split(',') }}"
2424
when: sas_token is defined
2525

@@ -39,7 +39,7 @@
3939
when: sas_token is defined
4040

4141
- name: Download PTF files recursively with wget
42-
command: "wget --no-directories --recursive --reject 'index.html*' --user={{ ptf_user }} --password={{ ptf_password }} --no-parent {{ ptf_url }}"
42+
ansible.builtin.command: "wget --no-directories --recursive --reject 'index.html*' --user={{ ptf_user }} --password={{ ptf_password }} --no-parent {{ ptf_url }}"
4343
args:
4444
chdir: "{{ ptf_dir }}"
4545
when:
@@ -49,35 +49,35 @@
4949
- ptf_url is defined
5050

5151
- name: List downloaded files
52-
command: "ls -la"
52+
ansible.builtin.command: "ls -la"
5353
args:
5454
chdir: "{{ ptf_dir }}"
5555
register: download_list
5656

5757
- name: Display downloaded files
58-
debug:
58+
ansible.builtin.debug:
5959
var: download_list.stdout_lines
6060

6161
- name: Find downloaded RPM files
62-
find:
62+
ansible.builtin.find:
6363
paths: "{{ ptf_dir }}"
6464
patterns: "*.rpm"
6565
register: rpm_files
6666

6767
- name: Display found RPM files
68-
debug:
68+
ansible.builtin.debug:
6969
var: rpm_files.files
7070

7171
- name: Filter out src.rpm files
72-
set_fact:
72+
ansible.builtin.set_fact:
7373
filtered_rpm_files: "{{ rpm_files.files | selectattr('path', 'search', '^(?!.*src\\.rpm$).*') | list }}"
7474

7575
- name: Display filtered RPM files
76-
debug:
76+
ansible.builtin.debug:
7777
var: filtered_rpm_files
7878

7979
- name: Install PTF RPM packages
80-
zypper:
80+
community.general.zypper:
8181
name: "{{ item.path }}"
8282
state: present
8383
disable_gpg_check: true

ansible/playbooks/registration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Check if there are instances of `Not Registered` in it
2121
- name: Check for 'Not Registered'
22-
set_fact:
22+
ansible.builtin.set_fact:
2323
not_registered_found: "{{ 'Not Registered' in repos.stdout }}"
2424
ignore_errors: true
2525

ansible/playbooks/sap-hana-install.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
become_user: root
66
pre_tasks:
77
- name: Source hana install variables
8-
include_vars: ./vars/hana_vars.yaml
8+
ansible.builtin.include_vars: ./vars/hana_vars.yaml
99
vars:
1010
install_path: /var/lib/qedep
1111
install_file: "{{ install_path }}/{{ sap_hana_install_sid }}_install"

ansible/playbooks/sap-hana-system-replication-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
pre_tasks:
88
- name: Source hana install variables
9-
include_vars: ./vars/hana_vars.yaml
9+
ansible.builtin.include_vars: ./vars/hana_vars.yaml
1010

1111
vars:
1212
is_primary: "{{ ansible_play_hosts[0] == inventory_hostname }}"

ansible/playbooks/sap-hana-system-replication.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
when: ansible_play_hosts | length != 2
1212

1313
- name: Load HANA vars
14-
include_vars: ./vars/hana_vars.yaml
14+
ansible.builtin.include_vars: ./vars/hana_vars.yaml
1515

1616
vars:
1717
install_path: /var/lib/qedep

ansible/playbooks/tasks/azure-cluster-bootstrap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
- max_tasks_int | int < 4096
147147

148148
- name: Flush handlers
149-
meta: flush_handlers
149+
ansible.builtin.meta: flush_handlers
150150

151151
- name: Ensure 'CLOUD_NETCONFIG_MANAGE' is disabled for eth0
152152
ansible.builtin.lineinfile:

ansible/playbooks/tasks/azure-cluster-hana.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
- name: Validate cluster IP
110110
vars:
111111
ip_regex: "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
112-
assert:
112+
ansible.legacy.assert:
113113
that: cluster_ip is match(ip_regex)
114114
fail_msg: "The provided cluster IP address is not valid."
115115
when: cluster_ip is defined

ansible/playbooks/tasks/cluster-bootstrap.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
mode: '0600'
140140

141141
- name: Flush handler
142-
meta: flush_handlers
142+
ansible.builtin.meta: flush_handlers
143143

144144
- name: Get DefaultTasksMax value
145145
ansible.builtin.command: # noqa command-instead-of-module
@@ -181,7 +181,7 @@
181181
- max_tasks_int | int < 4096
182182

183183
- name: Flush handlers
184-
meta: flush_handlers
184+
ansible.builtin.meta: flush_handlers
185185

186186
# check crm status and fail if not return code != 0
187187
- name: Check the cluster is up
@@ -230,7 +230,7 @@
230230
op stop interval=0 timeout=180 \
231231
op monitor interval=120 timeout=60 \
232232
meta target-role=Started \
233-
params tag={{ aws_stonith_tag}} pcmk_delay_max=15
233+
params tag={{ aws_stonith_tag }} pcmk_delay_max=15
234234
when: cloud_platform_is_aws
235235

236236
- name: Set primary and secondary hostnames

ansible/playbooks/tasks/iscsi-client-sbd-prep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
- Restart iscsi
2525

2626
- name: Flush handlers
27-
meta: flush_handlers
27+
ansible.builtin.meta: flush_handlers
2828

2929
- name: Scan iscsi disks
3030
ansible.builtin.command:

0 commit comments

Comments
 (0)