diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-07-12 18:04:51 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-07-12 18:04:51 +0300 |
| commit | c4ccb8a8a8e6f1435c4db7873baa0df21295252f (patch) | |
| tree | d666b0a6f15c9c0f9f74ad6c475420d2f3ec994a /roles/jails | |
| parent | 659238b46057ed8a57e28004bb9dc07d6415a959 (diff) | |
Set up syncthing jail
Diffstat (limited to 'roles/jails')
| -rw-r--r-- | roles/jails/17_syncthing/defaults/main.yml | 12 | ||||
| -rw-r--r-- | roles/jails/17_syncthing/tasks/main.yml | 21 |
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 |
