]> git.phdru.name Git - ansible.git/commitdiff
Feat(logcheck): Replace script `distribute` with `rsync`
authorOleg Broytman <phd@phdru.name>
Thu, 1 Jan 2026 12:27:43 +0000 (15:27 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 1 Jan 2026 12:27:43 +0000 (15:27 +0300)
playbooks/logcheck.sh

index 05a9d0914807febfa21e129cc0296069fb7e0e3f..dab5efdcf69335919eb63fd4d6e2a2e85711c7a9 100755 (executable)
@@ -8,5 +8,14 @@ if ! git diff-index --quiet HEAD || test -n "`git ls-files --others`" ; then
     exit 1
 fi
 
-(cd ../.. && exec distribute -aD ansible)
+(
+    set -e
+    LC_CTYPE=en_US.UTF-8 hosts="`\"$HOME\"/.virtualenvs/ansible/bin/ansible --list-hosts servers | tail -n +2`"
+
+    cd ../..
+    for host in $hosts; do
+       rsync -ahPv --del ansible $host:admin/
+    done
+)
+
 exec ./run-playbook logcheck.yaml