From 22c90ba3d46e339ab28856fc9be64c59c4786752 Mon Sep 17 00:00:00 2001
From: Martin van Es <martin@mrvanes.com>
Date: Wed, 23 Mar 2022 16:54:44 +0100
Subject: [PATCH] WIP

---
 inventory/inventory                            |  3 ---
 inventory/local                                | 18 ++++++++++++++++++
 .../geodns/templates/geodns-update.service.j2  |  2 +-
 3 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 inventory/local

diff --git a/inventory/inventory b/inventory/inventory
index a09de80..49d8a9d 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -1,6 +1,4 @@
 # Inventory Aliases
-local           ansible_connection=local
-
 # Make sure to change group_vars/all.yml for the same hosts keys
 et2             ansible_host=et2.gndev.hexaa.eu ansible_user=ansible ansible_ssh_private_key_file=.ssh/id_ansible
 mdxcdn          ansible_host=mdxcdn.pt-38.utr.surfcloud.nl ansible_user=ansible ansible_ssh_private_key_file=.ssh/id_ansible
@@ -22,7 +20,6 @@ okeanos
 
 # Hosts that receive the GeoDNS role
 [geodns]
-local
 et2
 mdxcdn
 
diff --git a/inventory/local b/inventory/local
new file mode 100644
index 0000000..ff50ec0
--- /dev/null
+++ b/inventory/local
@@ -0,0 +1,18 @@
+# Inventory Aliases
+local           ansible_connection=local
+
+# Hosts that receive the mdsigner role
+[mdsigner]
+
+# Hosts that receive the mdproxy role
+[mdproxy]
+
+# Hosts that receive the GeoDNS role
+[geodns]
+local
+
+# All hosts for base role
+[all:children]
+mdsigner
+mdproxy
+geodns
diff --git a/roles/geodns/templates/geodns-update.service.j2 b/roles/geodns/templates/geodns-update.service.j2
index cdc08a1..17b702c 100644
--- a/roles/geodns/templates/geodns-update.service.j2
+++ b/roles/geodns/templates/geodns-update.service.j2
@@ -5,7 +5,7 @@ Description=GeoDNS update
 Type=oneshot
 WorkingDirectory={{ mdxsaas_dir }}
 ExecStart=git pull
-ExecStart={{ mdxsaas_dir }}/deploy.sh --tags geodns --limit local
+ExecStart=ansible-playbook playbook.yml -i inventory/local --tags geodns --limit local
 ExecStartPost=/bin/systemctl restart geodns
 
 [Install]
-- 
GitLab