diff options
author | Christian Pointner <equinox@ffgraz.net> | 2017-05-30 00:16:55 +0200 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2017-05-30 00:16:55 +0200 |
commit | 8cb754dacac0864f6b112e39fd6e7eaf3a339756 (patch) | |
tree | 623278e2d9f0cdfc7bf9efb0b11dfbca015e8cd0 /apply-role.sh |
inital commit
Diffstat (limited to 'apply-role.sh')
-rwxr-xr-x | apply-role.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apply-role.sh b/apply-role.sh new file mode 100755 index 0000000..3d39f34 --- /dev/null +++ b/apply-role.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ -z "$1" ] || [ -z "$2" ] ; then + echo "$0 <host(s)> <role>" + exit 1 +fi +hosts="$1" +shift +role="$1" +shift + +echo "######## applying the role '$role' to host(s) '$hosts' ########" +exec ansible-playbook -e "myhosts=$hosts" -e "myrole=$role" $@ generic.yaml |