diff --git a/.ansible-lint b/.ansible-lint deleted file mode 100644 index e02cde65f6..0000000000 --- a/.ansible-lint +++ /dev/null @@ -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 diff --git a/playbooks/zuul/run-base.yaml b/playbooks/zuul/run-base.yaml index 50aa0e6603..87a322edde 100644 --- a/playbooks/zuul/run-base.yaml +++ b/playbooks/zuul/run-base.yaml @@ -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 diff --git a/tox.ini b/tox.ini index bb5e97c319..be91219445 100644 --- a/tox.ini +++ b/tox.ini @@ -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