diff --git a/roles/fetch-javascript-tarball/tasks/main.yaml b/roles/fetch-javascript-tarball/tasks/main.yaml index 14de937b7..20bafcc6e 100644 --- a/roles/fetch-javascript-tarball/tasks/main.yaml +++ b/roles/fetch-javascript-tarball/tasks/main.yaml @@ -5,6 +5,9 @@ cp *.tgz dist/{{ zuul.project.short_name }}-latest.tar.gz args: chdir: "{{ zuul_work_dir }}" + tags: + # Ignore ANSIBLE0007: No need to use file module instead of mkdir + - skip_ansible_lint - name: Ensure artifacts directory exists file: diff --git a/test-requirements.txt b/test-requirements.txt index 7ed16f188..d786ee5aa 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,5 +9,3 @@ ansible<2.4 ansible-lint bashate>=0.2 zuul-sphinx>=0.1.1 -# Zuul is required to supply the zuul ansible modules for ansible-lint --e git://git.openstack.org/openstack-infra/zuul@feature/zuulv3#egg=zuul diff --git a/tox.ini b/tox.ini index 3fb274880..e19dd85dc 100644 --- a/tox.ini +++ b/tox.ini @@ -22,12 +22,19 @@ commands = bindep test commands = python setup.py build_sphinx [testenv:linters] -setenv = - ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg - ANSIBLE_LIBRARY= {envdir}/src/zuul/zuul/ansible/library +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. + ANSIBLE_ROLES_PATH whitelist_externals = bash commands = flake8 {posargs} + # Ansible lint + # [ANSIBLE0012] Commands should not change things if nothing needs doing + bash -c "find playbooks -type d -name "legacy" -prune -o \ + -type f -regex '.*.y[a]ml' -print0 | xargs -t -n1 -0 \ + ansible-lint -xANSIBLE0012" # Ansible Syntax Check bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -n1 -0 \ ansible-playbook --syntax-check -i tests/inventory 1>/dev/null"