From: Ralf Jung Date: Sun, 8 Apr 2018 08:23:11 +0000 (+0200) Subject: add script to run ad-hoc on all hosts X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/74521ce36504441f596ad17b9802a11fcd991290?ds=inline add script to run ad-hoc on all hosts --- diff --git a/all b/all new file mode 100755 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