Skip to content

Commit f96dc0e

Browse files
committed
testing: lint and docs improvements
This commit resolves the following lint rules: - 'yaml' - 'yaml[truthy]' - 'risky-file-permissions' - 'no-changed-when' It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]' to avoid skipping rules that are needed. Adds an exclusion folder for the .github folder due to ansible/ansible-lint#3645
1 parent 666961b commit f96dc0e

File tree

137 files changed

+248
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+248
-255
lines changed

config/ansible-lint.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
exclude_paths:
2+
- .github
3+
14
skip_list:
25
# Hide "wrong indentation: expected 4 but found 2 (indentation)"
36
# until we find out how to properly configure it
4-
- 'yaml'
7+
- 'yaml[indentation]'
8+
- 'yaml[line-length]'
59
# Do not force galaxy info in meta/main.yml
610
- 'meta-no-info'
711
# Hide "Commands should not change things if nothing needs doing"
@@ -16,8 +20,5 @@ skip_list:
1620
- 'deprecated-local-action'
1721
- 'no-free-form'
1822
- 'chema[meta]'
19-
- 'yaml[truthy]'
20-
- 'risky-file-permissions'
2123
- 'ignore-errors'
22-
- 'no-changed-when'
2324
- 'fqcn'

roles/benchmarking/benchmarking_deploy_coco_dataset/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Benchmarking.download_coco_dataset
44

roles/benchmarking/benchmarking_deploy_coco_dataset/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
template:
3737
src: "{{ coco_dataset_pvc }}"
3838
dest: "{{ artifact_extra_logs_dir }}/001_pvc_coco-dataset.yml"
39-
mode: 0400
39+
mode: '0400'
4040

4141
- name: Check if the PVC already exists
4242
command: oc get -f "{{ artifact_extra_logs_dir }}/001_pvc_coco-dataset.yml" -oname
@@ -52,7 +52,7 @@
5252
template:
5353
src: "{{ coco_dataset_pod }}"
5454
dest: "{{ artifact_extra_logs_dir }}/002_pod_coco-dataset.yml"
55-
mode: 0400
55+
mode: '0400'
5656

5757
- name: Delete the Pod, if it exists
5858
command:

roles/benchmarking/benchmarking_run_mlperf_ssd/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Benchmarking.run_mlperf_ssd
44

roles/benchmarking/benchmarking_run_mlperf_ssd/defaults/main/preset.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ benchmarking_run_mlperf_ssd_dataset_pvc_name: "benchmarking-coco-dataset"
55
benchmarking_run_mlperf_ssd_entrypoint_cm_name: "benchmarking-mlperf-ssd-entrypoint"
66

77
# name of the pod running the SSD benchmark
8-
benchmarking_run_mlperf_ssd_name: "benchmarking-mlperf-ssd"
8+
benchmarking_run_mlperf_ssd_name: "benchmarking-mlperf-ssd"

roles/benchmarking/benchmarking_run_mlperf_ssd/tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
template:
3535
src: "{{ benchmarking_mlperf_ssd_pod }}"
3636
dest: "{{ artifact_extra_logs_dir }}/001_pod_run-mlperf-ssd.yml"
37-
mode: 0400
37+
mode: '0400'
3838

3939
- name: Delete the Pod, if it exists
4040
command:
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.capture_environment
44

roles/cluster/cluster_capture_environment/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
copy:
4343
content: "{{ git_version.stdout }}"
4444
dest: "{{ artifact_extra_logs_dir }}/ci_artifact.git_version"
45-
mode: 0644
45+
mode: '0644'
4646

4747
- name: Fetch ci-artifact last git commit
4848
command:
@@ -53,7 +53,7 @@
5353
copy:
5454
content: "{{ git_show.stdout }}"
5555
dest: "{{ artifact_extra_logs_dir }}/ci_artifact.git_commit"
56-
mode: 0644
56+
mode: '0644'
5757

5858
- name: Get the cluster nodes status
5959
shell:

roles/cluster/cluster_create_htpasswd_user/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.create_htpasswd_adminuser
44

roles/cluster/cluster_create_htpasswd_user/tasks/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
template:
3434
src: "{{ cluster_create_htpasswd_user_oauth }}"
3535
dest: "{{ artifact_extra_logs_dir }}/oauth_htpasswd.yaml"
36-
mode: 0400
36+
mode: '0400'
3737

3838
- name: Append the htpasswd OAuth identity provider
3939
shell:
@@ -74,6 +74,7 @@
7474
ansible.builtin.file:
7575
path: /tmp/user_kubeconfig
7676
state: touch
77+
mode: '0644'
7778

7879
- name: Wait for the authentication to work
7980
when: cluster_create_htpasswd_user_wait | bool
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
cluster_create_htpasswd_user_oauth: "roles/cluster/cluster_create_htpasswd_user/templates/oauth.yml.j2"
2+
cluster_create_htpasswd_user_oauth: "roles/cluster/cluster_create_htpasswd_user/templates/oauth.yml.j2"

roles/cluster/cluster_create_osd/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.create_osd
44

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_aws_efs
44

roles/cluster/cluster_deploy_aws_efs/tasks/aws-efs.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
set_fact:
9999
cluster_tags: "{{ cluster_tags | default({}) | combine({item.key: item.value}) }}"
100100
with_items:
101-
- {'key': 'Name' , 'value': '{{ cluster_name_cmd.stdout }}'}
102-
- {'key': '{{ cluster_name_tag_cmd.stdout }}' , 'value': 'owned'}
101+
- {'key': 'Name', 'value': '{{ cluster_name_cmd.stdout }}'}
102+
- {'key': '{{ cluster_name_tag_cmd.stdout }}', 'value': 'owned'}
103103
- {'key': 'Purpose', 'value': ''}
104104

105105
- name: Get the SecurityGroup content

roles/cluster/cluster_deploy_aws_efs/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
template:
2727
src: "{{ cluster_deploy_aws_efs_csi_driver }}"
2828
dest: "{{ artifact_extra_logs_dir }}/csi-driver.yml"
29-
mode: 0400
29+
mode: '0400'
3030

3131
- name: Create the ClusterCSIDriver resource
3232
command: oc apply -f "{{ artifact_extra_logs_dir }}/csi-driver.yml"
@@ -35,7 +35,7 @@
3535
template:
3636
src: "{{ cluster_deploy_aws_efs_storage_class }}"
3737
dest: "{{ artifact_extra_logs_dir }}/storage-class.yml"
38-
mode: 0400
38+
mode: '0400'
3939

4040
- name: Create the StorageClass resource
4141
command: oc apply -f "{{ artifact_extra_logs_dir }}/storage-class.yml"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_kepler
44

roles/cluster/cluster_deploy_kepler/tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
git --git-dir "{{ kepler_location }}/.git" show
1717

1818
- name: Deploy kepler-operator
19-
shell:
19+
shell:
2020
cd "{{ kepler_location }}"; make deploy OPERATOR_IMG=quay.io/sustainable_computing_io/kepler-operator:latest
2121
register: deploy_kepler
2222
delay: 3

roles/cluster/cluster_deploy_ldap/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_ldap
44

roles/cluster/cluster_deploy_ldap/tasks/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
template:
7373
src: "{{ cluster_deploy_ldap_oauth }}"
7474
dest: "{{ artifact_extra_logs_dir }}/oauth_ldap.yaml"
75-
mode: 0400
75+
mode: '0400'
7676

7777
- name: Get LDAP URL
7878
command:
@@ -168,6 +168,7 @@
168168
ansible.builtin.file:
169169
path: /tmp/user_kubeconfig
170170
state: touch
171+
mode: '0644'
171172

172173
- name: Wait for the authentication to work
173174
when: cluster_deploy_ldap_wait | bool

roles/cluster/cluster_deploy_minio_s3_server/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_minio_s3_server
44

roles/cluster/cluster_deploy_nfs_provisioner/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_nfs_provisioner
44

roles/cluster/cluster_deploy_nfs_provisioner/files/nfs-server-and-provisioner/deploy/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
app: nfs-provisioner
5555
replicas: 1
5656
strategy:
57-
type: Recreate
57+
type: Recreate
5858
template:
5959
metadata:
6060
labels:

roles/cluster/cluster_deploy_nfs_provisioner/files/nfs-server-and-provisioner/deploy/export-pv-claim.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ spec:
88
- ReadWriteOnce
99
resources:
1010
requests:
11-
storage: 500Gi
11+
storage: 500Gi

roles/cluster/cluster_deploy_nfs_provisioner/files/nfs-server-and-provisioner/usage/pod-1.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ spec:
1919
- name: nfs-pvc
2020
persistentVolumeClaim:
2121
claimName: shared-folder
22-

roles/cluster/cluster_deploy_nfs_provisioner/files/nfs-server-and-provisioner/usage/pod-2.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ spec:
1919
- name: nfs-pvc
2020
persistentVolumeClaim:
2121
claimName: shared-folder
22-

roles/cluster/cluster_deploy_nginx_server/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_nginx_server
44

roles/cluster/cluster_deploy_operator/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_operator
44

roles/cluster/cluster_deploy_operator/tasks/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
template:
194194
src: "{{ cluster_deploy_operator_res_ns }}"
195195
dest: "{{ artifact_extra_logs_dir }}/src/000_namespace.yml"
196-
mode: 0400
196+
mode: '0400'
197197

198198
- name: Check if the namespace exists
199199
command: oc get "ns/{{ cluster_deploy_operator_namespace }}"
@@ -217,7 +217,7 @@
217217
template:
218218
src: "{{ cluster_deploy_operator_res_group }}"
219219
dest: "{{ artifact_extra_logs_dir }}/src/001_operator_group.yml"
220-
mode: 0400
220+
mode: '0400'
221221

222222
- name: Instantiate the OperatorHub OperatorGroup resource
223223
command: oc apply -f "{{ artifact_extra_logs_dir }}/src/001_operator_group.yml"
@@ -226,7 +226,7 @@
226226
template:
227227
src: "{{ cluster_deploy_operator_res_sub }}"
228228
dest: "{{ artifact_extra_logs_dir }}/src/002_sub.yml"
229-
mode: 0400
229+
mode: '0400'
230230

231231
- name: Instantiate the Subscription
232232
command: oc apply -f "{{ artifact_extra_logs_dir }}/src/002_sub.yml"

roles/cluster/cluster_deploy_redis_server/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.deploy_redis_server
44

roles/cluster/cluster_destroy_ocp/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.destroy_ocp
44

roles/cluster/cluster_destroy_ocp/meta/main.yml

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ dependencies:
33
- role: check_deps
44
vars:
55
check_deps_needs_cluster: false
6-

roles/cluster/cluster_destroy_ocp/tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
template:
3838
src: "{{ cluster_destroy_ocp_metadata_json }}"
3939
dest: "{{ artifact_extra_logs_dir }}/metadata.json"
40-
mode: 0400
40+
mode: '0400'
4141

4242
- name: Show metadata.json (debug)
4343
command:

roles/cluster/cluster_destroy_osd/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.destroy_osd
44

Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

roles/cluster/cluster_fill_workernodes/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.fill_workernodes
44

roles/cluster/cluster_fill_workernodes/tasks/fill_node.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
template:
7070
src: "{{ cluster_fill_workernodes_pod_template }}"
7171
dest: "{{ artifact_extra_logs_dir }}/src/pod_placeholder_{{ node_name }}.yaml"
72-
mode: 0400
72+
mode: '0400'
7373

7474
- name: Check if the Pod already exists
7575
command:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cluster_fill_workernodes_pod_template: roles/cluster/cluster_fill_workernodes/templates/pod_placeholder.yaml
1+
cluster_fill_workernodes_pod_template: roles/cluster/cluster_fill_workernodes/templates/pod_placeholder.yaml

roles/cluster/cluster_preload_image/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.preload_image
44

roles/cluster/cluster_preload_image/tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
template:
1010
src: "{{ cluster_preload_image_ds_template }}"
1111
dest: "{{ artifact_extra_logs_dir }}/src/preload_daemonset.yaml"
12-
mode: 0400
12+
mode: '0400'
1313

1414
- name: Delete the DaemonSet, it it exists
1515
command:
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
cluster_preload_image_ds_template: roles/cluster/cluster_preload_image/templates/daemonset.yaml.j2
2+
cluster_preload_image_ds_template: roles/cluster/cluster_preload_image/templates/daemonset.yaml.j2

roles/cluster/cluster_prometheus_db/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.reset_prometheus_db
44

roles/cluster/cluster_set_project_annotation/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.set_project_annotation
44

roles/cluster/cluster_set_scale/tasks/main.yml

-2
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,3 @@
155155
oc get machineset/{{ item }} -n openshift-machine-api > {{ artifact_extra_logs_dir }}/machineset_{{ item }}.status
156156
failed_when: false
157157
loop: "{{ oc_get_machinesets.stdout_lines }}"
158-
159-
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.undeploy_kepler
44

roles/cluster/cluster_undeploy_kepler/tasks/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
git --git-dir "{{ kepler_location }}/.git" show
1717

1818
- name: Undeploy kepler-operator
19-
shell:
19+
shell:
2020
cd "{{ kepler_location }}"; make uninstall; make undeploy 2>&1
2121
register: undeploy_kepler
2222
failed_when:

roles/cluster/cluster_undeploy_ldap/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.undeploy_ldap
44

roles/cluster/cluster_upgrade_to_image/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Cluster.upgrade_to_image
44

roles/codeflare/codeflare_capture_state/defaults/main/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Auto-generated file, do not edit manually ...
1+
# Auto-generated file, do not edit manually ...
22
# Toolbox generate command: repo generate_ansible_default_settings
33
# Source component: Codeflare.capture_state
44

0 commit comments

Comments
 (0)