From c51e90abc47b9324a9731a54823bd30597b79a17 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 28 Jan 2024 01:11:45 +0300 Subject: [PATCH] Feat(logcheck): Add `logcheck.sh` Check the tree is git-clean and sync it to the remote hosts. --- playbooks/logcheck.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 playbooks/logcheck.sh diff --git a/playbooks/logcheck.sh b/playbooks/logcheck.sh new file mode 100755 index 0000000..05a9d09 --- /dev/null +++ b/playbooks/logcheck.sh @@ -0,0 +1,12 @@ +#! /bin/sh +set -e +cd "`dirname \"$0\"`" + +git update-index -q --refresh +if ! git diff-index --quiet HEAD || test -n "`git ls-files --others`" ; then + echo "The tree is dirty, aborting..." >&2 + exit 1 +fi + +(cd ../.. && exec distribute -aD ansible) +exec ./run-playbook logcheck.yaml -- 2.39.5