]> git.phdru.name Git - ansible.git/commitdiff
Feat(playbooks/debian): Pass the host to the scripts
authorOleg Broytman <phd@phdru.name>
Fri, 11 Mar 2022 21:53:46 +0000 (00:53 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 11 Mar 2022 21:54:51 +0000 (00:54 +0300)
playbooks/debian/add-apache-vhost
playbooks/debian/add-dns-domain

index 5acb1e2278f8ef2e786dc9365067faf9fe621086..4139eb435e7cbefe2857ddbdc03ecb41bc97055c 100755 (executable)
@@ -1,13 +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\"`" &&
 exec ../run-roles debian/add-apache-vhost "$@" \
-   -e virtual_host="$vhost" -e gather_facts=true
+   -e virtual_host="$vhost" -e gather_facts=true -e hosts="$host"
index 8e8179014ea34d08a43e767f48c42293cd232d7a..68bd6de24ff051112d491fdcce740aba73768068 100755 (executable)
@@ -1,13 +1,15 @@
 #! /bin/sh
 
-if [ -z "$1" ]; then
-   echo "Usage: $0 domain [...params...]" >&2
+if [ -z "$2" ]; then
+   echo "Usage: $0 host domain [...params...]" >&2
    exit 1
 fi
 
+host="$1"
+shift
 domain="$1"
 shift
 
 cd "`dirname \"$0\"`" &&
 exec ../run-roles debian/add-dns-domain "$@" \
-   -e domain="$domain" -e gather_facts=true
+   -e domain="$domain" -e gather_facts=true -e hosts="$host"