Skip to content

Commit 7b66f2c

Browse files
committed
ci: switch to yamllint
Signed-off-by: Mohammed Naser <[email protected]>
1 parent b1fa4d3 commit 7b66f2c

File tree

13 files changed

+39
-25
lines changed

13 files changed

+39
-25
lines changed

.ansible-lint

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ exclude_paths:
33
- .ansible
44
- .github
55
- molecule
6-
- roles/cluster_api/files/providers
7-
- roles/cert_manager/files/chart
8-
- roles/cilium/files/chart
6+
97
skip_list:
108
- role-name
9+
- yaml

.yamllint.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
extends: default
2+
3+
rules:
4+
comments:
5+
min-spaces-from-content: 1
6+
comments-indentation: false
7+
document-start: disable
8+
line-length:
9+
max: 160
10+
braces:
11+
min-spaces-inside: 0
12+
max-spaces-inside: 1
13+
octal-values:
14+
forbid-implicit-octal: true
15+
forbid-explicit-octal: true

extensions/molecule/cluster-api/verify.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
name: "{{ item.name }}"
4242
namespace: "{{ item.namespace }}"
4343
register: _resource_info
44-
until: _resource_info.resources | json_query('[*].status.conditions[?reason==`NewReplicaSetAvailable`][].status') | select ('match','True') | list | length == 1
44+
until: _resource_info.resources | json_query('[*].status.conditions[?reason==`NewReplicaSetAvailable`][].status') | select ('match','True') | list | length == 1 # yamllint disable-line rule:line-length
4545
delay: 2
4646
retries: 5
4747
loop:
@@ -77,10 +77,10 @@
7777
- name: Parse provider resources into version mapping
7878
run_once: true
7979
ansible.builtin.set_fact:
80-
_cluster_api_core_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'CoreProvider') | map(attribute='version') | first | regex_replace('^v', '') }}"
81-
_cluster_api_bootstrap_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'BootstrapProvider') | map(attribute='version') | first | regex_replace('^v', '') }}"
82-
_cluster_api_control_plane_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'ControlPlaneProvider') | map(attribute='version') | first | regex_replace('^v', '') }}"
83-
_cluster_api_infrastructure_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'InfrastructureProvider') | map(attribute='version') | first | regex_replace('^v', '') }}"
80+
_cluster_api_core_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'CoreProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
81+
_cluster_api_bootstrap_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'BootstrapProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
82+
_cluster_api_control_plane_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'ControlPlaneProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
83+
_cluster_api_infrastructure_version: "{{ _cluster_api_providers.resources | selectattr('type', 'equalto', 'InfrastructureProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
8484

8585
- name: Assert that the versions are the correct ones
8686
ansible.builtin.assert:

extensions/molecule/upload-helm-chart/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
roles:
2020
- role: test-role
2121
vars:
22-
test_relative_path : "chart-v1/"
22+
test_relative_path: "chart-v1/"

roles/cluster_api/meta/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies:
3030
url: "{{ cluster_api_provider_path }}/bootstrap-{{ cluster_api_bootstrap_provider }}/v{{ cluster_api_bootstrap_version }}/bootstrap-components.yaml"
3131
- name: kubeadm
3232
type: ControlPlaneProvider
33-
url: "{{ cluster_api_provider_path }}/control-plane-{{ cluster_api_control_plane_provider }}/v{{ cluster_api_control_plane_version }}/control-plane-components.yaml" # noqa: yaml[line-length]
33+
url: "{{ cluster_api_provider_path }}/control-plane-{{ cluster_api_control_plane_provider }}/v{{ cluster_api_control_plane_version }}/control-plane-components.yaml" # yamllint disable-line rule:line-length
3434
- name: openstack
3535
type: InfrastructureProvider
36-
url: "{{ cluster_api_provider_path }}/infrastructure-{{ cluster_api_infrastructure_provider }}/v{{ cluster_api_infrastructure_version }}/infrastructure-components.yaml" # noqa: yaml[line-length]
36+
url: "{{ cluster_api_provider_path }}/infrastructure-{{ cluster_api_infrastructure_provider }}/v{{ cluster_api_infrastructure_version }}/infrastructure-components.yaml" # yamllint disable-line rule:line-length

roles/cluster_api/tasks/upgrade.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
- name: Parse provider resources into version mapping
66
run_once: true
77
ansible.builtin.set_fact:
8-
cluster_api_installed_core_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'CoreProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # noqa: yaml[line-length]
9-
cluster_api_installed_bootstrap_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'BootstrapProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # noqa: yaml[line-length]
10-
cluster_api_installed_control_plane_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'ControlPlaneProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # noqa: yaml[line-length]
11-
cluster_api_installed_infrastructure_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'InfrastructureProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # noqa: yaml[line-length]
8+
cluster_api_installed_core_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'CoreProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
9+
cluster_api_installed_bootstrap_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'BootstrapProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
10+
cluster_api_installed_control_plane_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'ControlPlaneProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
11+
cluster_api_installed_infrastructure_version: "{{ cluster_api_providers.resources | selectattr('type', 'equalto', 'InfrastructureProvider') | map(attribute='version') | first | regex_replace('^v', '') }}" # yamllint disable-line rule:line-length
1212

1313
- name: Run upgrade if required
1414
run_once: true

roles/clusterctl/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ clusterctl_checksums:
3333
1.8.4: 8fbaa26320fcdd11aa40e1e2ae4889f9743c33744e1d191eec2afca54d34bdbc
3434
1.10.5: 8831f604a2571947ef19bfa9fd9dcc50b67e42deb6651bb09382e4bca212d795
3535

36-
clusterctl_download_url: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v{{ clusterctl_version }}/clusterctl-linux-{{ download_artifact_goarch }}" # noqa: yaml[line-length]
36+
clusterctl_download_url: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v{{ clusterctl_version }}/clusterctl-linux-{{ download_artifact_goarch }}" # yamllint disable-line rule:line-length
3737
clusterctl_download_dest: /usr/local/bin/clusterctl
3838
clusterctl_binary_checksum: "{{ clusterctl_checksums[download_artifact_goarch][clusterctl_version] }}"
3939

roles/flux/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ flux_checksums:
2020
arm64:
2121
0.32.0: 6834c6fde64df9883b76c6b3a3111a6d00f88553373b892f363491b0896c0654
2222

23-
flux_download_url: "https://github.com/fluxcd/flux2/releases/download/v{{ flux_version }}/flux_{{ flux_version }}_linux_{{ download_artifact_goarch }}.tar.gz" # noqa: yaml[line-length]
23+
flux_download_url: "https://github.com/fluxcd/flux2/releases/download/v{{ flux_version }}/flux_{{ flux_version }}_linux_{{ download_artifact_goarch }}.tar.gz" # yamllint disable-line rule:line-length
2424
flux_download_dest: "{{ download_artifact_work_directory }}/flux-{{ flux_version }}-linux-{{ download_artifact_goarch }}.tar.gz"
2525
flux_download_unarchive_dest: /usr/bin
2626
flux_binary_checksum: "{{ flux_checksums[download_artifact_goarch][flux_version] }}"

roles/helm/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ helm_diff_checksums:
3838
arm64:
3939
v3.8.1: d451e4772a3987710f485de4caed760583c88f8f15864a623b3fbd73be7077ec
4040

41-
helm_diff_download_url: "https://github.com/databus23/helm-diff/releases/download/{{ helm_diff_version }}/helm-diff-{{ ansible_facts['system'] | lower }}-{{ download_artifact_goarch }}.tgz" # noqa: yaml[line-length]
42-
helm_diff_download_dest: "{{ download_artifact_work_directory }}/helm-diff-{{ helm_diff_version }}-{{ ansible_facts['system'] | lower }}-{{ download_artifact_goarch }}.tgz" # noqa: yaml[line-length]
41+
helm_diff_download_url: "https://github.com/databus23/helm-diff/releases/download/{{ helm_diff_version }}/helm-diff-{{ ansible_facts['system'] | lower }}-{{ download_artifact_goarch }}.tgz" # yamllint disable-line rule:line-length
42+
helm_diff_download_dest: "{{ download_artifact_work_directory }}/helm-diff-{{ helm_diff_version }}-{{ ansible_facts['system'] | lower }}-{{ download_artifact_goarch }}.tgz" # yamllint disable-line rule:line-length
4343
helm_diff_checksum: "{{ helm_diff_checksums[download_artifact_goarch][helm_diff_version] }}"

roles/kubeadm/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ kubeadm_checksums:
5757
1.32.8: 8dbd3fa2d94335d763b983caaf2798caae2d4183f6a95ebff28289f2e86edf68
5858
1.33.4: ef471b454d68ee211e279ddeaebde6ee7a8e14b66ae58e0d0184e967c3595892
5959

60-
kubeadm_download_url: "https://cdn.dl.k8s.io/release/v{{ kubeadm_version }}/bin/{{ ansible_facts['system'] | lower }}/{{ download_artifact_goarch }}/kubeadm" # noqa: yaml[line-length]
60+
kubeadm_download_url: "https://cdn.dl.k8s.io/release/v{{ kubeadm_version }}/bin/{{ ansible_facts['system'] | lower }}/{{ download_artifact_goarch }}/kubeadm" # yamllint disable-line rule:line-length
6161
kubeadm_download_dest: /usr/bin/kubeadm
6262
kubeadm_binary_checksum: "{{ kubeadm_checksums[download_artifact_goarch][kubeadm_version] }}"
6363

0 commit comments

Comments
 (0)