summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chaos-at-home/r3-cccamp19-flora.yml1
-rw-r--r--chaos-at-home/r3-cccamp19-gw.yml5
-rw-r--r--inventory/host_vars/ch-pan.yml4
-rw-r--r--inventory/host_vars/dione.yml3
-rw-r--r--inventory/host_vars/helene.yml3
-rw-r--r--inventory/host_vars/r3-cccamp19-flora.yml3
-rw-r--r--inventory/host_vars/r3-cccamp19-gw.yml3
-rw-r--r--inventory/hosts.ini4
-rw-r--r--roles/dyndns/client/templates/dyndns.service.j22
9 files changed, 25 insertions, 3 deletions
diff --git a/chaos-at-home/r3-cccamp19-flora.yml b/chaos-at-home/r3-cccamp19-flora.yml
index 09f4f74d..0208c1db 100644
--- a/chaos-at-home/r3-cccamp19-flora.yml
+++ b/chaos-at-home/r3-cccamp19-flora.yml
@@ -5,3 +5,4 @@
- role: base
- role: sshd
- role: zsh
+ - role: dyndns/client
diff --git a/chaos-at-home/r3-cccamp19-gw.yml b/chaos-at-home/r3-cccamp19-gw.yml
new file mode 100644
index 00000000..d729471a
--- /dev/null
+++ b/chaos-at-home/r3-cccamp19-gw.yml
@@ -0,0 +1,5 @@
+---
+- name: configure dyndns
+ hosts: r3-cccamp19-gw
+ roles:
+ - dyndns/client
diff --git a/inventory/host_vars/ch-pan.yml b/inventory/host_vars/ch-pan.yml
index 285f9cc1..9c7324ef 100644
--- a/inventory/host_vars/ch-pan.yml
+++ b/inventory/host_vars/ch-pan.yml
@@ -4,3 +4,7 @@ dyndns:
zone_file: /etc/bind/db.schaaas.at
clients:
ele-media: elemedia
+ r3-cccamp19-gw: r3-cccamp19-gw
+ r3-cccamp19-flora: r3-cccamp19-flora
+ dione: r3-cccamp19-dione
+ helene: r3-cccamp19-helene
diff --git a/inventory/host_vars/dione.yml b/inventory/host_vars/dione.yml
index 7a2e4a92..b0f68f04 100644
--- a/inventory/host_vars/dione.yml
+++ b/inventory/host_vars/dione.yml
@@ -32,3 +32,6 @@ kubelet_lvm:
lv: kubelet
size: 10G
fs: ext4
+
+dyndns:
+ server: ch-pan
diff --git a/inventory/host_vars/helene.yml b/inventory/host_vars/helene.yml
index c5b4fea3..6b433e79 100644
--- a/inventory/host_vars/helene.yml
+++ b/inventory/host_vars/helene.yml
@@ -32,3 +32,6 @@ kubelet_lvm:
lv: kubelet
size: 10G
fs: ext4
+
+dyndns:
+ server: ch-pan
diff --git a/inventory/host_vars/r3-cccamp19-flora.yml b/inventory/host_vars/r3-cccamp19-flora.yml
index bb4b9c02..00302f8c 100644
--- a/inventory/host_vars/r3-cccamp19-flora.yml
+++ b/inventory/host_vars/r3-cccamp19-flora.yml
@@ -29,3 +29,6 @@ network:
ip: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}"
mask: "{{ network_zones.lan.prefix | ipaddr('netmask') }}"
gateway: "{{ network_zones.lan.gw }}"
+
+dyndns:
+ server: ch-pan
diff --git a/inventory/host_vars/r3-cccamp19-gw.yml b/inventory/host_vars/r3-cccamp19-gw.yml
new file mode 100644
index 00000000..c6150b4d
--- /dev/null
+++ b/inventory/host_vars/r3-cccamp19-gw.yml
@@ -0,0 +1,3 @@
+---
+dyndns:
+ server: ch-pan
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index 0caacaf8..46e3ef0f 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -11,7 +11,7 @@ ansible_port=22000
[chaos_at_home:vars]
host_domain=chaos-at-home.org
env_group=chaos-at-home
-ansible_host={{ host_name }}.{{ host_domain }}
+#ansible_host={{ host_name }}.{{ host_domain }}
ansible_port=222
[chaos_at_home]
@@ -62,9 +62,9 @@ r3-cccamp19
[r3-cccamp19:vars]
host_domain=camp.realraum.at
-ansible_port=222
[r3-cccamp19]
+r3-cccamp19-gw
r3-cccamp19-sw0 ansible_host=192.168.41.200 ansible_port=22
r3-cccamp19-flora host_name=flora
diff --git a/roles/dyndns/client/templates/dyndns.service.j2 b/roles/dyndns/client/templates/dyndns.service.j2
index 7997a8ea..f2c6f813 100644
--- a/roles/dyndns/client/templates/dyndns.service.j2
+++ b/roles/dyndns/client/templates/dyndns.service.j2
@@ -3,7 +3,7 @@ Description=Update dyndns using {{ hostvars[dyndns.server].host_name }}.{{ hostv
[Service]
Type=oneshot
-ExecStart=/usr/bin/ssh {{ hostvars[dyndns.server].host_name }}.{{ hostvars[dyndns.server].host_domain }} {{ dyndns_client_id }}
+ExecStart=/usr/bin/ssh -4 {{ hostvars[dyndns.server].host_name }}.{{ hostvars[dyndns.server].host_domain }} {{ dyndns_client_id }}
User=dyndns
Group=dyndns
Nice=19