Update syncthing configuration

This commit is contained in:
Sonny Bakker 2026-01-08 19:51:49 +01:00
parent 273dbbee26
commit dfbaa7b4da
4 changed files with 13 additions and 133 deletions

View file

@ -25,6 +25,11 @@
owner: sonny
group: sonny
- name: Stop current containers
community.docker.docker_compose_v2:
project_src: "{{ syncthing_app_dir }}"
state: stopped
- name: Remove previous Syncthing configurations
become: true
ansible.builtin.file:
@ -40,6 +45,11 @@
group: sonny
mode: "0755"
# The current configuration has the bare minimum options configured per element
# and relies on falling back to syncthing's defaults. This is because Syncthing
# overwrites the config file while the application is running,
# see https://forum.syncthing.net/t/manage-devices-and-folders-with-ansible/20078.
# Note that the config version should also be updated whenever the image tag is updated.
- name: Copy Syncthing configuration
become: true
ansible.builtin.template:
@ -58,17 +68,6 @@
group: sonny
mode: "0755"
- name: Stop current containers
community.docker.docker_compose_v2:
project_src: "{{ syncthing_app_dir }}"
state: stopped
- name: Pull missing image
community.docker.docker_compose_v2:
project_src: "{{ syncthing_app_dir }}"
pull: missing
state: stopped
- name: Remove dangling containers
community.docker.docker_compose_v2:
project_src: "{{ syncthing_app_dir }}"