summaryrefslogtreecommitdiff
path: root/roles/whawty/auth/store/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-01-24 15:42:31 +0100
committerChristian Pointner <equinox@spreadspace.org>2024-01-24 15:42:31 +0100
commitc5d55e1f33c7f5ca3d84fc2a2de5e60b4f4995b7 (patch)
tree4ac919633c47be60d9e50253ebf959c13b9ed46f /roles/whawty/auth/store/templates
parentwhawty/auth/store: fix permission handling and add know-hosts file (diff)
whawty/auth/store: sync make use of ssh master connections
Diffstat (limited to 'roles/whawty/auth/store/templates')
-rw-r--r--roles/whawty/auth/store/templates/systemd.service.j214
-rw-r--r--roles/whawty/auth/store/templates/systemd.timer.j211
2 files changed, 2 insertions, 23 deletions
diff --git a/roles/whawty/auth/store/templates/systemd.service.j2 b/roles/whawty/auth/store/templates/systemd.service.j2
index 5b1db6b2..2fe45642 100644
--- a/roles/whawty/auth/store/templates/systemd.service.j2
+++ b/roles/whawty/auth/store/templates/systemd.service.j2
@@ -1,19 +1,9 @@
-{% set rsync_args = [] %}
-{% if 'permissions' in whawty_auth_store %}
-{% if 'file-mode' in whawty_auth_store.permissions %}
-{% set _dummy = rsync_args.append(" --chmod=F"~whawty_auth_store.permissions['file-mode']) %}
-{% endif %}
-{% if 'owner' in whawty_auth_store.permissions %}
-{% set _dummy = rsync_args.append(" --chown="~whawty_auth_store.permissions.owner~":"~whawty_auth_store.permissions.group) %}
-{% endif %}
-{% endif %}
[Unit]
Description=sync for whawty-auth store {{ whawty_auth_store.name }}
[Service]
-Type=oneshot
-ExecStart=/usr/bin/rsync -rtW --delete --delete-delay --delay-updates --partial-dir=.tmp{{ rsync_args | join('') }} -e 'ssh -F "/etc/whawty/auth/.store-{{ whawty_auth_store.name }}-sync/ssh_config"' 'rsync://whawty-auth-server/store' '{{ whawty_auth_store.config.basedir }}'
-TimeoutStartSec=40s
+Type=simple
+ExecStart=/etc/whawty/auth/.store-{{ whawty_auth_store.name }}-sync/run.sh
# systemd hardening-options
AmbientCapabilities=CAP_CHOWN CAP_FOWNER
diff --git a/roles/whawty/auth/store/templates/systemd.timer.j2 b/roles/whawty/auth/store/templates/systemd.timer.j2
deleted file mode 100644
index 603295a5..00000000
--- a/roles/whawty/auth/store/templates/systemd.timer.j2
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=sync for whawty-auth store {{ whawty_auth_store.name }}
-
-[Timer]
-OnBootSec=30s
-OnActiveSec=5s
-OnUnitActiveSec=1m
-AccuracySec=5s
-
-[Install]
-WantedBy=timers.target