Skip to content

Commit

Permalink
Fix trivial ansible lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mpagot committed Oct 4, 2024
1 parent f5eafbf commit c177427
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions ansible/playbooks/additional_fence_agent_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

tasks:
- name: Verify installation
command: "rpm -qf $(which fence_azure_arm)"
ansible.builtin.shell: "rpm -qf $(which fence_azure_arm)"
args:
_uses_shell: true
register: verify_installation

- name: Display verification result
debug:
ansible.builtin.debug:
var: verify_installation.stdout_lines

- name: Install additional Python packages
zypper:
community.general.zypper:
name:
- python311-pexpect
- python311-pycurl
Expand Down
20 changes: 10 additions & 10 deletions ansible/playbooks/ptf_installation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
tasks:

- name: Create directory for PTF installation
file:
ansible.builtin.file:
path: "{{ ptf_dir }}"
state: directory
mode: '0755'

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

Expand All @@ -39,7 +39,7 @@
when: sas_token is defined

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

- name: List downloaded files
command: "ls -la"
ansible.builtin.command: "ls -la"
args:
chdir: "{{ ptf_dir }}"
register: download_list

- name: Display downloaded files
debug:
ansible.builtin.debug:
var: download_list.stdout_lines

- name: Find downloaded RPM files
find:
ansible.builtin.find:
paths: "{{ ptf_dir }}"
patterns: "*.rpm"
register: rpm_files

- name: Display found RPM files
debug:
ansible.builtin.debug:
var: rpm_files.files

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

- name: Display filtered RPM files
debug:
ansible.builtin.debug:
var: filtered_rpm_files

- name: Install PTF RPM packages
zypper:
community.general.zypper:
name: "{{ item.path }}"
state: present
disable_gpg_check: true
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

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

Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/sap-hana-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
become_user: root
pre_tasks:
- name: Source hana install variables
include_vars: ./vars/hana_vars.yaml
ansible.builtin.include_vars: ./vars/hana_vars.yaml
vars:
install_path: /var/lib/qedep
install_file: "{{ install_path }}/{{ sap_hana_install_sid }}_install"
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/sap-hana-system-replication-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

pre_tasks:
- name: Source hana install variables
include_vars: ./vars/hana_vars.yaml
ansible.builtin.include_vars: ./vars/hana_vars.yaml

vars:
is_primary: "{{ ansible_play_hosts[0] == inventory_hostname }}"
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/sap-hana-system-replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
when: ansible_play_hosts | length != 2

- name: Load HANA vars
include_vars: ./vars/hana_vars.yaml
ansible.builtin.include_vars: ./vars/hana_vars.yaml

vars:
install_path: /var/lib/qedep
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/tasks/azure-cluster-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
- max_tasks_int | int < 4096

- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers

- name: Ensure 'CLOUD_NETCONFIG_MANAGE' is disabled for eth0
ansible.builtin.lineinfile:
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/tasks/azure-cluster-hana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
- name: Validate cluster IP
vars:
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]?)$"
assert:
ansible.legacy.assert:
that: cluster_ip is match(ip_regex)
fail_msg: "The provided cluster IP address is not valid."
when: cluster_ip is defined
Expand Down
6 changes: 3 additions & 3 deletions ansible/playbooks/tasks/cluster-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
mode: '0600'

- name: Flush handler
meta: flush_handlers
ansible.builtin.meta: flush_handlers

- name: Get DefaultTasksMax value
ansible.builtin.command: # noqa command-instead-of-module
Expand Down Expand Up @@ -181,7 +181,7 @@
- max_tasks_int | int < 4096

- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers

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

- name: Set primary and secondary hostnames
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/tasks/iscsi-client-sbd-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- Restart iscsi

- name: Flush handlers
meta: flush_handlers
ansible.builtin.meta: flush_handlers

- name: Scan iscsi disks
ansible.builtin.command:
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/tasks/iscsi-server-sbd-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
sap_storage_cloud_type: 'generic'
sap_storage_sap_type: 'sap_hana'
sap_storage_action: 'prepare'
include_role:
ansible.buildin.include_role:
name: ../roles/qe_sap_storage

- name: Configure HANA SBD target
Expand Down

0 comments on commit c177427

Please sign in to comment.