Update to ansible-lint 6.8.2

This updates to ansible-lint 6.8.2.

The prior changes have updated various things for new things the
linter picked up.

As noted inline, the jinja2 parsing has not been working well with
this repository.  I've been keeping an eye on it over several
releases, but I think at this point it's not going to work well for
us.  I've left discussion in .ansible-lint.

The var-spacing in stage-output is the old name for the jinja2
filtering; since that is now ignored in .ansible-lint it can be
removed.

Change-Id: Ia2c9392eeb232b9b2b1d4febce8493d71de64482
This commit is contained in:
Ian Wienand 2022-10-17 13:48:32 +11:00
parent 8c6512107c
commit fc8e68f0e9
No known key found for this signature in database
3 changed files with 21 additions and 3 deletions

View File

@ -6,8 +6,28 @@ skip_list:
- no-tabs # Most files should not contain tabs - no-tabs # Most files should not contain tabs
- role-name # Role name does not match ``^[a-z][a-z0-9_]+$`` pattern - 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 - fqcn-builtins # It would probably be good to enforce this, but it's a lot
- fqcn # similar to above
- risky-file-permissions # It would probably also good to enforce this if someone wants to look at them - 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? - schema # This is a stricter form of schema per https://github.com/ansible/schemas. might also be good if someone has motivation?
# NOTE(ianw) After following the jinja formatting extensions in
# ansible-lint for a few releases, this does not seem to be
# appropriate for us. It has broken in a couple of releases [1,2]
# -- but more importantly as discussed in [1] this is a bit
# opinonated in ways we may not like; for example
# varibale|int > 123
# I would argue is clearer than
# variable | int > 123
# which it tries to enforce. This is a bit unfortunate because it
# does pick up some other things were people have clearly forgotten
# spaces around variables, etc. Let's leave it up to humans to
# decide on good jinja here.
# [1] https://github.com/ansible/ansible-lint/issues/2330
# [2] https://github.com/ansible/ansible-lint/issues/2461
# [3] https://github.com/ansible/ansible-lint/issues/2605
- jinja[spacing]
- jinja[invalid]
use_default_rules: true use_default_rules: true
verbosity: 1 verbosity: 1
mock_modules: mock_modules:

View File

@ -5,4 +5,4 @@ flake8
yamllint>=1.23.0 yamllint>=1.23.0
# 6.5.0 : https://github.com/ansible/ansible-lint/issues/2330 # 6.5.0 : https://github.com/ansible/ansible-lint/issues/2330
# 6.5.1 : https://github.com/ansible/ansible-lint/issues/2320 # 6.5.1 : https://github.com/ansible/ansible-lint/issues/2320
ansible-lint>6.0.0,<6.5.0 ansible-lint>6.8.0

View File

@ -96,8 +96,6 @@
# gzip will however return 1 if any compressed file is encountered, so we # gzip will however return 1 if any compressed file is encountered, so we
# must ignore that (there's no specific error code). # must ignore that (there's no specific error code).
- name: Archive everything from logs - 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 shell: gzip --recursive --best {{ zj_log_file.path }} || true
args: args:
chdir: "{{ stage_dir }}/logs" chdir: "{{ stage_dir }}/logs"