From c428dacb8eb7af00c5c8aafa805502feb1b0625c Mon Sep 17 00:00:00 2001 From: binary Date: Tue, 3 Nov 2020 23:25:59 +0100 Subject: Init ssh role --- roles/ssh/templates/generate_dns.j2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/ssh/templates/generate_dns.j2 (limited to 'roles/ssh/templates') diff --git a/roles/ssh/templates/generate_dns.j2 b/roles/ssh/templates/generate_dns.j2 new file mode 100644 index 0000000..c8d5a44 --- /dev/null +++ b/roles/ssh/templates/generate_dns.j2 @@ -0,0 +1,13 @@ +{% for host in groups["servers"] %} +{% set host = hostvars[host] %} + +Match originalhost dcontroller exec "systemctl is-active wg-quick@{{ _i.dcontroller }}.service" + HostName {{ host.ip.inbound }} + Port {{ host.services.tcp.ssh }} + +Match originalhost {{ host.ansible_host }} + HostName {{ host.ip.outbound }} + Port {{ host.services.tcp.ssh }} + User root + +{% endfor %} -- cgit v1.2.3