linters: update to ansible-lint 6

This updates to ansible-lint 6.  Some prior changes have updated for
the bulk of the rules, a couple of noqa points are added here.  Some
updates to the skipped rules are added.  This should have no
operational change, the only updates are cosmetic.

Change-Id: I165677bbb904f92292df00f7b9b27f8f3573aeb0
This commit is contained in:
Ian Wienand 2022-07-26 20:47:16 +10:00
parent 6d23d20f2f
commit 5a2c7bff96
3 changed files with 12 additions and 1 deletions

View File

@ -5,6 +5,9 @@ skip_list:
- no-changed-when # Commands should not change things if nothing needs doing
- no-tabs # Most files should not contain tabs
- role-name # Role name does not match ``^[a-z][a-z0-9_]+$`` pattern
- fqcn-builtins # It would probably be good to enforce this, but it's a lot
- risky-file-permissions # It would probably also good to enforce this if someone wants to look at them
- schema # This is a stricter form of schema per https://github.com/ansible/schemas. might also be good if someone has motivation?
use_default_rules: true
verbosity: 1
mock_modules:
@ -14,3 +17,7 @@ loop_var_prefix: zj_
# Enable rules that are disabled by default:
enable_list:
- no-same-owner
# Local variables:
# mode: yaml
# End:

View File

@ -3,4 +3,4 @@
ansible>=2.9,<2.11 # required by ansible-lint
flake8
yamllint>=1.23.0
ansible-lint>=5.0.0,<6.0.0
ansible-lint>6.0.0,<7.0.0

View File

@ -29,6 +29,8 @@
{{- extensions -}}
- name: Build the extensions regular expression
# https://github.com/ansible/ansible-lint/issues/2241
# noqa var-spacing
set_fact:
extensions_regex: "^(.*)\\.({{ extension_list | join('|') }})$"
@ -122,6 +124,8 @@
# gzip will however return 1 if any compressed file is encountered, so we
# must ignore that (there's no specific error code).
- name: Archive everything from logs
# https://github.com/ansible/ansible-lint/issues/2241
# noqa var-spacing
shell: gzip --recursive --best {{ zj_log_file.path }} || true
args:
chdir: "{{ stage_dir }}/logs"