From bdb8b5c1675f683c41fa05c9b9f82479eb45d95f Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 15 Apr 2019 16:53:18 +0100 Subject: [PATCH] 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 --- .ansible-lint | 5 +++++ tox.ini | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..2d88cc7 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,5 @@ +--- +parseable: true +skip_list: + # [ANSIBLE0012] Commands should not change things if nothing needs doing + - ANSIBLE0012 diff --git a/tox.ini b/tox.ini index f535f5b..bcf33d6 100644 --- a/tox.ini +++ b/tox.ini @@ -38,11 +38,10 @@ whitelist_externals = bash commands = flake8 {posargs} # Ansible lint - # [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" + xargs -t -n1 -0 ansible-lint" 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 bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \ ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \