add script to run ad-hoc on all hosts
authorRalf Jung <post@ralfj.de>
Sun, 8 Apr 2018 08:23:11 +0000 (10:23 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 8 Apr 2018 08:23:11 +0000 (10:23 +0200)
all [new file with mode: 0755]

diff --git a/all b/all
new file mode 100755 (executable)
index 0000000..b6e4cf3
--- /dev/null
+++ b/all
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+
+for HOST in $(fgrep 'all:' hosts | sed 's/.*all: *//g'); do
+  echo "Running on $HOST"
+  ansible "$HOST" "$@"
+  echo
+done