Skip to content

Commit

Permalink
Make ansible-lint check mandatory and enable "all tasks named" rule (a…
Browse files Browse the repository at this point in the history
…pache#165)

This change skip following lint rules for now:

ANSIBLE0006: Using command rather than module
ANSIBLE0012: Commands should not change things if nothing needs doing
ANSIBLE0013: Use shell only when shell functionality is required

For apache#164
  • Loading branch information
liusheng authored and Zhuli committed Apr 24, 2018
1 parent af8797e commit 5978c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion playbooks/openlab-zuul-jobs-check/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set -o pipefail
set -x
pip install ansible-lint
find playbooks -type f -regex '.*.y[a]?ml' -not -path "{{ excluded_path }}" -print0 | xargs -t -n1 -0 ansible-lint -xANSIBLE0012 || true
find playbooks -type f -regex '.*.y[a]?ml' -not -path "{{ excluded_path }}" -print0 | xargs -t -n1 -0 ansible-lint -xANSIBLE0012,ANSIBLE0013,ANSIBLE0006
find playbooks -type f -regex '.*.y[a]?ml' -not -path "{{ excluded_path }}" -exec ansible-playbook -v --syntax-check -i ./playbooks/openlab-zuul-jobs-check/inventory \{\} + > /dev/null
executable: /bin/bash
chdir: '{{ zuul.project.src_dir }}'
Expand Down

0 comments on commit 5978c2d

Please sign in to comment.