Skip to content

Commit

Permalink
CI: Enforce truish values in YAML linting (#4812)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista authored Dec 16, 2024
1 parent e8d7939 commit 660b4b8
Show file tree
Hide file tree
Showing 111 changed files with 312 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/container_build_base.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Build base container

on:
"on":
push:
branches:
- devel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container_build_dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Build dev container

on:
"on":
push:
branches:
- devel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container_build_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
# The devcontainers/[email protected] build will fail if this env variable is not set.
BUILDX_NO_DEFAULT_ATTESTATIONS: 1

on:
"on":
workflow_call:
inputs:
# Container name, e.g. "base", "dev", etc.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container_build_universal.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Build universal container

on:
"on":
push:
branches:
- devel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/new-cvp-integration.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: "CV integration testing"

# on: pull_request
on: workflow_dispatch
# "on": pull_request
"on": workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/offline-links-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Check links offline for dead targets"

on:
"on":
# schedule every day at 3 AM on devel
schedule:
- cron: "0 3 * * *"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-comment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Pull Request Comment"

on:
"on":
pull_request_target:
types:
- opened
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-conflict.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "PR Conflicts checker"
on:
"on":
pull_request_target:
types: [synchronize]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Collection code testing"

on: pull_request
"on": pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-rn-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# changed post merge
name: "Label for Release Notes"

on:
"on":
pull_request_target:
types:
- closed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-triage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Pull Request Triage"

on:
"on":
pull_request_target:
types:
- opened
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Issue and PR stale management"
on:
"on":
schedule:
- cron: "0 0 * * *"

Expand Down
7 changes: 6 additions & 1 deletion .github/yamllintrc
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@ rules:
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
truthy: disable
trailing-spaces:
ignore:
/python-avd/pyavd/**/schema/*.schema.yml
new-line-at-end-of-file:
ignore:
/python-avd/pyavd/**/schema/*.schema.yml
1 change: 0 additions & 1 deletion ansible_collections/arista/avd/.yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ rules:
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
truthy: disable
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks:
- name: Generate fabric documentation
run_once: true
delegate_to: localhost
check_mode: no
check_mode: false
copy:
content: "{{ lookup('template','documentation/fabric-documentation.j2') | arista.avd.add_md_toc(skip_lines=3) }}"
dest: "{{ fabric_dir }}/{{ fabric_name }}-documentation.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The `arista.avd.cv_workflow` module is an Ansible Action Plugin providing the fo
arista.avd.cv_workflow:
cv_servers: [ "www.arista.io" ]
cv_token: "<insert vaulted service account token here>"
# cv_verify_certs: True
# cv_verify_certs: true
configuration_dir: "{{ inventory_dir }}/intended/configs"
structured_config_dir: "{{ inventory_dir }}/intended/structured_configs"
# structured_config_suffix: "yml"
Expand All @@ -93,7 +93,7 @@ The `arista.avd.cv_workflow` module is an Ansible Action Plugin providing the fo
# description:
# id: <uuid or similar>
requested_state: submitted
force: True
force: true
change_control:
# name:
# description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ The module is used in `arista.avd.eos_designs` to set facts for devices, which a
- name: Set eos_designs facts
arista.avd.eos_designs_facts:
schema_id: eos_designs
check_mode: False
run_once: True
check_mode: false
run_once: true

- name: Set eos_designs facts per device
ansible.builtin.set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ The `arista.avd.eos_designs_structured_config` module is an Ansible Action Plugi
options:
list_merge: replace
strip_empty_keys: false
check_mode: no
changed_when: False
check_mode: false
changed_when: false
```
## Authors
Expand Down
8 changes: 4 additions & 4 deletions ansible_collections/arista/avd/docs/porting-guides/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ tenants:
- id: 113
name: Tenant_A_OP_Zone_4
tags: [ DC1_LEAF1 ]
enabled: True
enabled: true
ospf:
enabled: true
+ area: 0
Expand Down Expand Up @@ -1322,11 +1322,11 @@ router_ospf:
- connected: {}
- static: {}
+ bgp:
+ enabled: True
+ enabled: true
+ connected:
+ enabled: True
+ enabled: true
+ static:
+ enabled: True
+ enabled: true
```

The change has been incorporated into `eos_designs`, so action is only required when directly defining `structured_configuration`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@
run_once: true
ansible.legacy.uri:
url: https://{{ cv_server }}/api/resources/changecontrol/v1/ChangeControlConfig?key.id={{ cv_deploy_results.change_control.id }}
validate_certs: yes
return_content: yes
validate_certs: true
return_content: true
headers:
Accept: "application/json"
Content-Type: "application/json"
Authorization: "Bearer {{ lookup('env', 'CVAAS_AAWG_CI') }}"
method: DELETE
body_format: json
force_basic_auth: yes
force_basic_auth: true
timeout: 10
register: cvp_abandon_cc_result
until: cvp_abandon_cc_result.status == 200
retries: 3
delay: 3
ignore_errors: True
ignore_errors: true
when: cv_deploy_results.change_control.state | lower in ['pending approval', 'approved']

- name: Cleanup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
run_once: true
ansible.legacy.uri:
url: https://{{ cv_server }}/api/resources/workspace/v1/WorkspaceConfig/some
validate_certs: yes
return_content: yes
validate_certs: true
return_content: true
headers:
Accept: "application/json"
Content-Type: "application/json"
Expand All @@ -78,13 +78,13 @@
}
]
}
force_basic_auth: yes
force_basic_auth: true
timeout: 10
register: cvp_abandon_workspace_result
until: cvp_abandon_workspace_result.status == 200
retries: 3
delay: 3
ignore_errors: True
ignore_errors: true
when: cv_deploy_results.workspace.id is not none and cv_deploy_results.workspace.id | length > 0

- name: Cleanup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@
run_once: true
ansible.legacy.uri:
url: https://{{ cv_server }}/api/resources/changecontrol/v1/ChangeControlConfig?key.id={{ cv_deploy_results.change_control.id }}
validate_certs: yes
return_content: yes
validate_certs: true
return_content: true
headers:
Accept: "application/json"
Content-Type: "application/json"
Authorization: "Bearer {{ lookup('env', 'CVAAS_AAWG_CI') }}"
method: DELETE
body_format: json
force_basic_auth: yes
force_basic_auth: true
timeout: 10
register: cvp_abandon_cc_result
until: cvp_abandon_cc_result.status == 200
retries: 3
delay: 3
ignore_errors: True
ignore_errors: true
when: cv_deploy_results.change_control.state | lower in ['pending approval', 'approved']

- name: Cleanup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
run_once: true
ansible.legacy.uri:
url: https://{{ cv_server }}/api/resources/workspace/v1/WorkspaceConfig/some
validate_certs: yes
return_content: yes
validate_certs: true
return_content: true
headers:
Accept: "application/json"
Content-Type: "application/json"
Expand All @@ -70,13 +70,13 @@
}
]
}
force_basic_auth: yes
force_basic_auth: true
timeout: 10
register: cvp_abandon_workspace_result
until: cvp_abandon_workspace_result.status == 200
retries: 3
delay: 3
ignore_errors: True
ignore_errors: true
when: cv_deploy_results.workspace.id is not none and cv_deploy_results.workspace.id | length > 0

- name: Cleanup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# configlet_name_template: "AVD-${hostname}"
cv_servers: [ '{{ cv_server }}' ]
cv_token: '{{ token }}'
# cv_verify_certs: True
# cv_verify_certs: true
workspace:
name: '{{ ws_name }}'
description: '{{ ws_description }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# configlet_name_template: "AVD-${hostname}"
cv_servers: [ '{{ cv_server }}' ]
cv_token: '{{ token }}'
# cv_verify_certs: True
# cv_verify_certs: true
workspace:
name: '{{ ws_name }}'
description: '{{ ws_description }}'
Expand Down
Loading

0 comments on commit 660b4b8

Please sign in to comment.