Created
September 30, 2021 00:10
-
-
Save scottharwell/726288ffc633bc2e863c59dbd971e831 to your computer and use it in GitHub Desktop.
Revisions
-
scottharwell created this gist
Sep 30, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/usr/bin/env bash # Run yamllint first to ensure that code passes checks yamllint . YAML_LINT=$? # Go ahead and stop if yamllint fails since ansible-lint takes a while if [ $YAML_LINT == 1 ]; then exit 1 fi # Run ansible-lint to ensure ansible checks ansible-lint ANSIBLE_LINT=$? EXIT_CODE=$(($YAML_LINT + $ANSIBLE_LINT)) exit $EXIT_CODE