Skip to content

Commit

Permalink
update linters config for ansible-lint and yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
yurnov committed Feb 3, 2025
1 parent 1943dfc commit 4babb0f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.ansible.com/ansible-lint/docs/rules/
# no-changed-when is not requried for examples
plugins/connection/kubectl.py no-changed-when
# false positive result
plugins/connection/kubectl.py var-naming[no-reserved]
2 changes: 2 additions & 0 deletions .config/ansible-lint-ignore.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# no-changed-when is not requried for examples
plugins/connection/kubectl.py no-changed-when
# false positive result
plugins/connection/kubectl.py var-naming[no-reserved]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ changelogs/.plugin-cache.yaml
tests/output
tests/integration/cloud-config-*
.cache
.ansible

# Helm charts
tests/integration/*-chart-*.tgz
Expand Down
8 changes: 8 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@ rules:
braces:
max-spaces-inside: 1
level: error

brackets:
max-spaces-inside: 1
level: error
comments:
min-spaces-from-content: 1
comments-indentation: false
document-start: disable
line-length: disable
truthy: disable
indentation:
spaces: 2
indent-sequences: consistent
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
ignore: |
.cache
.tox
.ansible
tests/output
2 changes: 1 addition & 1 deletion tests/integration/targets/k8s_manifest_url/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- name: Update directory permissions
file:
path: "{{ manifests_dir.path }}"
mode: 0755
mode: '0755'

- name: Create manifests files
copy:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/lookup_kustomize/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
- name: make script as executable
file:
path: "{{ tmp_dir_path }}/install_kustomize.sh"
mode: 0755
mode: '0755'

- name: Install kustomize
command: "{{ tmp_dir_path }}/install_kustomize.sh"
Expand Down

0 comments on commit 4babb0f

Please sign in to comment.