Use standard ansible-lint config file
Allows calling ansible-lint directly instead of hardcoding its configuration inside tox. This plays much better with other tools, like editors which may perform the linting themselves. Change-Id: I09e48322f11de33a2ce97a27cf7cf93225ccc12c
This commit is contained in:
parent
e0c347ace3
commit
bdb8b5c167
5
.ansible-lint
Normal file
5
.ansible-lint
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
parseable: true
|
||||||
|
skip_list:
|
||||||
|
# [ANSIBLE0012] Commands should not change things if nothing needs doing
|
||||||
|
- ANSIBLE0012
|
5
tox.ini
5
tox.ini
@ -38,11 +38,10 @@ whitelist_externals = bash
|
|||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
# Ansible lint
|
# Ansible lint
|
||||||
# [ANSIBLE0012] Commands should not change things if nothing needs doing
|
|
||||||
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
|
bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
|
||||||
xargs -t -n1 -0 ansible-lint -xANSIBLE0012"
|
xargs -t -n1 -0 ansible-lint"
|
||||||
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
||||||
xargs -t -n1 ansible-lint -xANSIBLE0012'
|
xargs -t -n1 ansible-lint'
|
||||||
# Ansible Syntax Check
|
# Ansible Syntax Check
|
||||||
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
|
bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
|
||||||
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \
|
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user