Update syncthing configuration

This commit is contained in:
Sonny Bakker 2025-03-13 22:40:27 +01:00
parent d148eca9b7
commit 171426a358
12 changed files with 303 additions and 292 deletions

View file

@ -1,14 +1,18 @@
- name: create configuration dir
file:
- name: Create configuration dir
ansible.builtin.file:
path: '{{ xdg_config_dir }}/syncthing'
state: directory
mode: '0755'
# Syncthing config files should not be overwritten,
# see https://docs.syncthing.net/users/config.html#config-file-format
- name: copy configuration file
template:
src: 'templates/{{ platform }}/syncthing.j2'
- name: Stop syncthing service
ansible.builtin.systemd:
name: syncthing
scope: user
state: stopped
- name: Copy configuration file
ansible.builtin.template:
src: 'templates/syncthing.j2'
dest: '{{ xdg_config_dir }}/syncthing/config.xml'
mode: '0600'
force: false
notify: restart syncthing
mode: '0640'
notify: start syncthing