summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/new.theopensourceway.org.yml (renamed from playbooks/deploy.yml)2
-rw-r--r--roles/local_deploy/files/ansible_run.sh12
2 files changed, 12 insertions, 2 deletions
diff --git a/playbooks/deploy.yml b/playbooks/new.theopensourceway.org.yml
index 4ecb493..6051910 100644
--- a/playbooks/deploy.yml
+++ b/playbooks/new.theopensourceway.org.yml
@@ -1,5 +1,5 @@
---
-- hosts: new
+- hosts: new.theopensourceway.org
vars:
mailman_webinterface: lists.theopensourceway.org
mailman_prefix: theopensourceway.org
diff --git a/roles/local_deploy/files/ansible_run.sh b/roles/local_deploy/files/ansible_run.sh
index db4888f..4430224 100644
--- a/roles/local_deploy/files/ansible_run.sh
+++ b/roles/local_deploy/files/ansible_run.sh
@@ -1,3 +1,13 @@
#!/bin/sh
cd /etc/ansible
-ansible-playbook -l "$(hostname -f)," -c local playbooks/deploy.yml
+for i in local $(hostname -s) $(hostname -f); do
+ FILE=playbooks/${i}.yml
+ [ -f $FILE ] && RESULT=$FILE
+done
+
+if [ -n $RESULT ]; then
+ ansible-playbook -c local $RESULT
+else
+ echo "No playbook for this host found"
+ exit 1
+fi