From 8cb754dacac0864f6b112e39fd6e7eaf3a339756 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 30 May 2017 00:16:55 +0200 Subject: inital commit --- apply-role.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 apply-role.sh (limited to 'apply-role.sh') 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 " + 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 -- cgit v1.2.1