]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/add-apache-vhost
Feat(playbooks/debian): Pass the host to the scripts
[ansible.git] / playbooks / debian / add-apache-vhost
index 0d2c502c1cbb522962699aa535e99395a2c99db1..4139eb435e7cbefe2857ddbdc03ecb41bc97055c 100755 (executable)
@@ -1,14 +1,15 @@
 #! /bin/sh
 
-if [ -z "$1" ]; then
-   echo "Usage: $0 vhost [...params...]" >&2
+if [ -z "$2" ]; then
+   echo "Usage: $0 host vhost [...params...]" >&2
    exit 1
 fi
 
+host="$1"
+shift
 vhost="$1"
 shift
 
 cd "`dirname \"$0\"`" &&
-ANSIBLE_ROLES_PATH=debian/roles:roles \
-   exec ../run-role add-apache-vhost "$@" \
-      -e virtual_host="$vhost" -e gather_facts=true
+exec ../run-roles debian/add-apache-vhost "$@" \
+   -e virtual_host="$vhost" -e gather_facts=true -e hosts="$host"