add script to run ad-hoc on all hosts
[ansible.git] / all
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