Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dubiousOne committed Mar 8, 2016
0 parents commit b378d8a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lint-it.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# used by jenkins to lint ansible playbooks

echo "=> Linting Ansible Code"
fail_ansible=0
for f in `find . -name "*.yml"`; do
echo "==> LINTING $f"
ansible-lint $f
rc=$?
if [[ $rc != 0 ]]; then
echo "==> LINTING FAIL: $f"
fail_ansible=1
fi
done

if [[ $fail_ansible == 1 ]]; then
echo "=> FAIL"
exit 1
else
echo "=> SUCCESS"
fi

0 comments on commit b378d8a

Please sign in to comment.