Browse Source

Advance ansible-lint cap to test with 4

Running latest ansible-lint raises violations for rules 204, 206 and
601 so skip them for now.

Change-Id: Ibc62833cfc4b2fae728bc6c944f263af3fc2b89d
changes/95/667695/1
Jeremy Stanley 1 month ago
parent
commit
1ed78d714f
2 changed files with 8 additions and 4 deletions
  1. 3
    2
      test-requirements.txt
  2. 5
    2
      tox.ini

+ 3
- 2
test-requirements.txt View File

@@ -12,8 +12,9 @@ zuul
12 12
 # dependency solver and the uncapped ansible requirement from
13 13
 # ansible-lint pull in the latest version.
14 14
 ansible>=2.5.1,<2.6 # https://review.openstack.org/567007
15
-# We need to pin ansible-lint to before 4.0 which blows up all over the place
16
-ansible-lint<4
15
+# Don't automatically switch to ansible-lint 5 when it becomes
16
+# available, so that it can be evaluated for an orderly transition.
17
+ansible-lint<5
17 18
 bashate>=0.2
18 19
 stestr>=1.0.0 # Apache-2.0
19 20
 # For upload-logs-swift:

+ 5
- 2
tox.ini View File

@@ -42,10 +42,13 @@ commands =
42 42
   flake8 {posargs}
43 43
   # Ansible lint
44 44
   # [ANSIBLE0012] Commands should not change things if nothing needs doing
45
+  # [204] Lines should be no longer than 160 chars
46
+  # [206] Variables should have spaces before and after: {{ var_name }}
47
+  # [601] Don't compare to literal True/False
45 48
   bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
46
-    xargs -t -n1 -0 ansible-lint -xANSIBLE0012"
49
+    xargs -t -n1 -0 ansible-lint -xANSIBLE0012,204,206,601"
47 50
   bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
48
-    xargs -t -n1 ansible-lint -xANSIBLE0012'
51
+    xargs -t -n1 ansible-lint -xANSIBLE0012,204,206,601'
49 52
   # Ansible Syntax Check
50 53
   bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
51 54
     ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"

Loading…
Cancel
Save