Update syncthing configuration
This commit is contained in:
parent
d148eca9b7
commit
171426a358
12 changed files with 303 additions and 292 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue