Stop running ansible-lint on this repo

It is buggy (throwing exceptions for undefinied variables which are
actualyl defined via set_fact), and we frequently run into problems
using it in this repo.  It was designed to lint roles for Galaxy,
not the way we write ansible.  As of the 5.0.0 release it's
generating >4.5K lines of complaints about files in this repository.

Change-Id: If9d8c19b5e663bdd6b6f35ffed88db3cff3d79f8
This commit is contained in:
James E. Blair 2020-06-03 13:58:18 -07:00 committed by Jeremy Stanley
parent accfb8b0fd
commit e58a18d8a1
3 changed files with 2 additions and 52 deletions

View File

@ -1,47 +0,0 @@
parseable: true
# ANSIBLE0010: Package installs should not use latest
# We often deploy latest pip packages
#
# 204: Lines < 160
# Things like keys, script lines, etc exceed this. We have good
# taste and only use long lines where appropriate.
#
# 206: {{var}} should have spaces {{ var }}
# This rule seems sane, but it appears there's no way to convince
# ansible-lint perfectly good things that are *not* ansible (like
# exim configs) in YAML shouldn't have to follow this rule. See
# https://github.com/ansible/ansible-lint/issues/534; might be able
# to turn on if fixed.
#
# 306: shells with pipes should use pipefail
# This requires running the shell as /bin/bash. There is a small
# possibility to hide errors, but we can rely on
# developers to decide when to explicitly check for failures.
#
# 503: tasks that run when "changed" should likely be handlers
# We can trust reviewers to decide if something should be a
# generic handler or not.
#
# 106: Role name does not match ``^[a-z][a-z0-9_]+$`` pattern
# These aren't collections so this doesn't matter
#
# 208: file permissions not mentioned, re-evaluate after
# https://github.com/ansible/ansible-lint/pull/949
skip_list:
- ANSIBLE0004
- ANSIBLE0006
- ANSIBLE0007
- ANSIBLE0010
- ANSIBLE0011
- ANSIBLE0012
- ANSIBLE0013
- ANSIBLE0015
- '106'
- '208'
- '204'
- '206'
- '304'
- '306'
- '503'
use_default_rules: true
verbosity: 1

View File

@ -106,11 +106,9 @@
zuul_job: '{{ zuul.job }}'
zuul: '{{ zuul }}'
# The default of '' here is to satisfy ansible-lint, which
# otherwise throws a j2 formatting exception.
- name: Write out testinfra extra data fixture
copy:
content: "{{ testinfra_extra_data | default('') | to_nice_yaml(indent=2) }}"
content: '{{ testinfra_extra_data | to_nice_yaml(indent=2) }}'
dest: '/home/zuul/testinfra_extra_data_fixture.yaml'
- name: Make screenshots directory

View File

@ -13,7 +13,7 @@ deps =
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
bashate>=0.2 # Apache-2.0
PyYAML>=3.10.0 # MIT
ansible-lint>=4.1.0
ansible
openstacksdk
testtools
mock
@ -30,7 +30,6 @@ commands =
# parses, but doesn't do anything.
bash -c "ANSIBLE_INVENTORY_PLUGINS=./playbooks/roles/install-ansible/files/inventory_plugins ansible -i ./inventory/base/hosts.yaml not_a_host -a 'true'"
python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 ansible-lint"
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt