Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles weren't actually linted properly. Switch run-docs to command task, since we are not using any shell variables. Ignore ANSIBLE0012 for now. Change-Id: Id184f7eb5dd67117e7dde9c8eb38a3a8af9dd892 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
6a8e17bf61
commit
c0c9653ab5
@ -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 }}"
|
||||
|
2
tests/ansible.cfg
Normal file
2
tests/ansible.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
[defaults]
|
||||
roles_path = ../roles
|
7
tox.ini
7
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}
|
||||
|
Loading…
Reference in New Issue
Block a user