Fix ansible-lint job

The 'linters' tox environment was not running on roles, it was only
running on playbooks. This change adds a command to the linters
environment to ensure all roles are linted. This also cleans up a
comment in the tox file that was referring to a nonexistent zuul job.

Change-Id: I04d9d79fca16a7f78f9c646f96e5fba78a5f5329
This commit is contained in:
Colleen Murphy 2018-03-29 15:35:19 +02:00
parent 7f870cc05b
commit 2fd1a55e63
1 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,7 @@ setenv =
passenv =
# NOTE(pabelanger): if you'd like to run tox -elinters locally, you'll need
# to export ANSIBLE_ROLES_PATH pointing to the currect repos.
# see infra-zuul-jobs-linters job for more information.
# see openstack-zuul-jobs-linters job for more information.
ANSIBLE_ROLES_PATH
# Add dependencies here since other jobs use python2 and zuul requires
# python3.
@ -35,6 +35,8 @@ commands =
# [ANSIBLE0012] Commands should not change things if nothing needs doing
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
xargs -t -n1 -0 ansible-lint -xANSIBLE0012"
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
xargs -t -n1 ansible-lint -xANSIBLE0012'
# Ansible Syntax Check
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \