From: Oleg Broytman Date: Sat, 27 Jan 2024 22:11:45 +0000 (+0300) Subject: Feat(logcheck): Add `logcheck.sh` X-Git-Url: https://git.phdru.name/?p=ansible.git;a=commitdiff_plain;h=c51e90abc47b9324a9731a54823bd30597b79a17 Feat(logcheck): Add `logcheck.sh` Check the tree is git-clean and sync it to the remote hosts. --- 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