diff --git a/roles/run-docs/tasks/main.yaml b/roles/run-docs/tasks/main.yaml index 39668a62..dce70911 100644 --- a/roles/run-docs/tasks/main.yaml +++ b/roles/run-docs/tasks/main.yaml @@ -1,4 +1,4 @@ - name: Execute run-docs.sh. - shell: "/usr/local/jenkins/slave_scripts/run-docs.sh {{ tox_envlist }}" + command: "/usr/local/jenkins/slave_scripts/run-docs.sh {{ tox_envlist }}" args: chdir: "{{ zuul_work_dir }}" diff --git a/tests/ansible.cfg b/tests/ansible.cfg new file mode 100644 index 00000000..51d344dc --- /dev/null +++ b/tests/ansible.cfg @@ -0,0 +1,2 @@ +[defaults] +roles_path = ../roles diff --git a/tox.ini b/tox.ini index 7afd70be..f4086d9c 100644 --- a/tox.ini +++ b/tox.ini @@ -21,11 +21,16 @@ commands = bindep test commands = python setup.py build_sphinx [testenv:pep8] +setenv = + ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg whitelist_externals = bash commands = flake8 {posargs} + # Ansible Lint Check + # NOTE(pabelanger): Ignore the following checks: + # ANSIBlE0012: Commands should not change things if nothing needs doing bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ - ansible-lint" + ansible-lint -x ANSIBLE0012" [testenv:venv] commands = {posargs}