From e38f34ccb87ef9a3969454d369b185d25c87246f Mon Sep 17 00:00:00 2001 From: Aleskey Zalesov Date: Mon, 5 Mar 2018 14:59:51 +0300 Subject: [PATCH] Run syntax check without inventory file - useful in the development setting where no deployment takes place - shows a lot of warnings about the inventory file absence --- hooks/pre-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh index 75f1ecf..56502c7 100755 --- a/hooks/pre-commit.sh +++ b/hooks/pre-commit.sh @@ -11,7 +11,7 @@ STASH_NAME="pre-commit-$(date +%s)" git stash save -q --keep-index $STASH_NAME echo "Checking the playbook syntax" -ansible-playbook -i hosts site.yml --syntax-check +ansible-playbook -i none site.yml --syntax-check RESULT=$? if [[ $RESULT == 0 ]]; then