From 1c2cea1ddad256d39fbe31d62c1e1bf90813d6eb Mon Sep 17 00:00:00 2001
From: Alexander Dahl <alex@netz39.de>
Date: Mon, 9 Jan 2023 21:09:43 +0100
Subject: [PATCH] :wrench: Clarify naming of ssh jump host groups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The key difference between these groups is not that one needs a jump
host and the other does not, but that all hosts of one group run on
machines located in the Netz39 rooms in Magdeburg, while the other group
contains only hosts hosted anywhere in the public internet.  We'll need
this distinction for more things than SSH in the future, e.g. PR !132.

(This is also better, because technically there could be a third group
requiring a jump host which is not ssh.n39.eu … :wink: )

Acked-by: Stefan Haun <tux@netz39.de>
Acked-by: David Kilias <dkdent@netz39.de>
---
 inventory.yml           | 4 ++--
 templates/ssh_config.j2 | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/inventory.yml b/inventory.yml
index e7c8c54..b2ed6cc 100644
--- a/inventory.yml
+++ b/inventory.yml
@@ -28,7 +28,7 @@ all:
         pottwal.n39.eu:
         radon.n39.eu:
         unicorn.n39.eu:
-    ssh_jump:
+    location_space:
       hosts:
         beaker.n39.eu:
         hobbes.n39.eu:
@@ -40,6 +40,6 @@ all:
         radon.n39.eu:
         wittgenstein.n39.eu:
         unicorn.n39.eu:
-    ssh_no_jump:
+    location_internet:
       hosts:
         tau.netz39.de:
diff --git a/templates/ssh_config.j2 b/templates/ssh_config.j2
index 7c48c9f..8dcadf2 100644
--- a/templates/ssh_config.j2
+++ b/templates/ssh_config.j2
@@ -6,7 +6,7 @@ Host ssh.n39.eu
   User {{ setup_ssh_logname }}
   Port 22
 
-{% for host in groups['ssh_jump'] %}
+{% for host in groups['location_space'] %}
 Host {{ host }}
   Hostname {{ host }}
   IdentityFile {{ setup_ssh_key }}
@@ -16,7 +16,7 @@ Host {{ host }}
   Port 22
 
 {% endfor %}
-{% for host in groups['ssh_no_jump'] %}
+{% for host in groups['location_internet'] %}
 Host {{ host }}
   Hostname {{ host }}
   IdentityFile {{ setup_ssh_key }}
@@ -24,4 +24,4 @@ Host {{ host }}
   User {{ setup_ssh_logname }}
   Port 22
 
-{% endfor %}
\ No newline at end of file
+{% endfor %}