summaryrefslogtreecommitdiff
path: root/roles/dyndns/client/templates/dyndns.service.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-01-12 03:30:30 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-01-12 03:30:30 +0100
commit83e27ac758c38ffd9931ef8830e0256e772e5881 (patch)
tree69c9637f488f5db46bacd6b0c47705e4c0309a9e /roles/dyndns/client/templates/dyndns.service.j2
parentelevate/media: minor cleanup and fixes (diff)
added dyndns client role
Diffstat (limited to 'roles/dyndns/client/templates/dyndns.service.j2')
-rw-r--r--roles/dyndns/client/templates/dyndns.service.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/dyndns/client/templates/dyndns.service.j2 b/roles/dyndns/client/templates/dyndns.service.j2
new file mode 100644
index 00000000..31a430ee
--- /dev/null
+++ b/roles/dyndns/client/templates/dyndns.service.j2
@@ -0,0 +1,19 @@
+[Unit]
+Description=Update dyndns using {{ hostvars[dyndns_server].host_name }}.{{ hostvars[dyndns_server].host_domain }}
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ssh {{ hostvars[dyndns_server].host_name }}.{{ hostvars[dyndns_server].host_domain }} {{ dyndns_client_name }}
+User=dyndns
+Group=dyndns
+Nice=19
+CapabilityBoundingSet=CAP_CHOWN CAP_NET_BIND_SERVICE
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectSystem=strict
+ProtectHome=yes
+ProtectKernelTunables=yes
+ProtectControlGroups=yes
+RestrictRealtime=yes
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6