Fix ansible preupload checks
Remove code that checks path prefixes as the ansible configs are in
their own project. Just always check the project on all changes
Change-Id: Ia8268946bfd7f4833d0bcced4d0e7301848d5102
diff --git a/preupload-hooks/ansible-checks.sh b/preupload-hooks/ansible-checks.sh
index 380fdd5..4b1a1b6 100755
--- a/preupload-hooks/ansible-checks.sh
+++ b/preupload-hooks/ansible-checks.sh
@@ -18,24 +18,11 @@
set -e
-ANSIBLE_CHANGE=0
ANSIBLE_PATH=$1
-shift
-
-# Check to see if any changed files are in the ansible path
-for FILE in $@; do
- if [[ $FILE == $ANSIBLE_PATH* ]]; then
- ANSIBLE_CHANGE=1
- break
- fi
-done
-
-if (( ANSIBLE_CHANGE == 1 )); then
- if ! command -v ansible-lint >/dev/null; then
- echo "Command ansible-lint not found. Install the ansible-lint package."
- exit 1
- fi
-
- # Run ansible checks. Just lint for now
- ansible-lint $ANSIBLE_PATH
+if ! command -v ansible-lint >/dev/null; then
+ echo "Command ansible-lint not found. Install the ansible-lint package."
+ exit 1
fi
+
+# Run ansible checks. Just lint for now
+ansible-lint $ANSIBLE_PATH