aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails
diff options
context:
space:
mode:
Diffstat (limited to 'roles/jails')
-rw-r--r--roles/jails/17_syncthing/defaults/main.yml12
-rw-r--r--roles/jails/17_syncthing/tasks/main.yml21
2 files changed, 31 insertions, 2 deletions
diff --git a/roles/jails/17_syncthing/defaults/main.yml b/roles/jails/17_syncthing/defaults/main.yml
index a2d7d8f..a6c0f29 100644
--- a/roles/jails/17_syncthing/defaults/main.yml
+++ b/roles/jails/17_syncthing/defaults/main.yml
@@ -7,5 +7,13 @@ nullfs:
dst: /mnt/vault
- src: /usr/local/jails/volumes/storage/jan-systems-2025-content
dst: /mnt/jan-systems-2025-content
- - src: /usr/local/jails/volumes/storage/projects-ableton
- dst: /mnt/projects-ableton
+
+zfs:
+ - name: zroot/jails/volumes/syncthing_config
+ mountpoint: /usr/local/etc/syncthing
+
+pkg:
+ - syncthing
+
+services:
+ - syncthing
diff --git a/roles/jails/17_syncthing/tasks/main.yml b/roles/jails/17_syncthing/tasks/main.yml
index 2abdaff..4575308 100644
--- a/roles/jails/17_syncthing/tasks/main.yml
+++ b/roles/jails/17_syncthing/tasks/main.yml
@@ -1,2 +1,23 @@
- import_role:
name: jail
+ tasks_from: jail_setup
+
+- name: Set syncthing user UID to 1001
+ shell: pw usermod syncthing -u 1001 -g 1001 || true
+ changed_when: false
+
+- name: Set syncthing group GID to 1001
+ shell: pw groupmod syncthing -g 1001 || true
+ changed_when: false
+
+- name: Fix syncthing config ownership
+ file:
+ path: /usr/local/etc/syncthing
+ state: directory
+ owner: syncthing
+ group: syncthing
+ recurse: true
+
+- import_role:
+ name: jail
+ tasks_from: jail_launch