Skip to content

Commit a1cc3de

Browse files
committed
Refactor conditional statements for improved readability in disk and main configuration checks
1 parent 574052f commit a1cc3de

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/roles/configuration_checks/tasks/disks.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@
9898
verbosity: 1
9999

100100
- name: Collect ANF storage data if NFS is used
101-
when: NFS_provider is defined and 'ANF' in NFS_provider and ANF_account_rg is defined and ANF_account_name is defined
101+
when:
102+
- NFS_provider is defined
103+
- "'ANF' in NFS_provider"
104+
- ANF_account_rg is defined
105+
- ANF_account_name is defined
102106
register: anf_storage_metadata_results
103107
delegate_to: localhost
104108
ansible.builtin.shell:

src/roles/configuration_checks/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545

4646
- name: "{{ check_type.name }} - Execute HA and Load Balancer module when high_availability checks to be run"
4747
ansible.builtin.include_tasks: ha_modules.yml
48-
when: >-
49-
check_type.file_name == "high_availability" and
50-
role in ['SCS', 'ERS', 'DB']
48+
when:
49+
- check_type.file_name == "high_availability"
50+
- role in ['SCS', 'ERS', 'DB']
5151

5252
- name: "{{ check_type.name }} - Prepare system context information"
5353
ansible.builtin.set_fact:

0 commit comments

Comments
 (0)