From 3e08dd2bf5d902d08aa5693777d94afc0d74a3fd Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Wed, 27 Oct 2021 14:27:42 +0200 Subject: [PATCH] Add syncthing configuration --- tasks/syncthing.yml | 12 +++ templates/syncthing.j2 | 164 +++++++++++++++++++++++++++++++++++++++++ vars/network.yml | 3 - vars/syncthing.yml | 8 ++ 4 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 templates/syncthing.j2 create mode 100644 vars/syncthing.yml diff --git a/tasks/syncthing.yml b/tasks/syncthing.yml index e69de29..2e4c3bf 100644 --- a/tasks/syncthing.yml +++ b/tasks/syncthing.yml @@ -0,0 +1,12 @@ +- name: copy syncthing template + template: + src: 'templates/syncthing.j2' + dest: '{{ ansible_env.HOME }}/.config/syncthing/config.xml' + mode: '0600' + +- name: restart syncthing service + systemd: + name: syncthing + state: restarted + enabled: true + scope: user diff --git a/templates/syncthing.j2 b/templates/syncthing.j2 new file mode 100644 index 0000000..cea67de --- /dev/null +++ b/templates/syncthing.j2 @@ -0,0 +1,164 @@ + + + + + basic + + + + + + + + + + 1 + + 3600 + + 0 + 0 + 0 + random + false + 0 + 0 + 10 + false + false + false + 25 + .stfolder + false + 0 + 2 + false + standard + standard + false + true + + + basic + + + + + + + + + + 1 + + 3600 + + 0 + 0 + 0 + random + false + 0 + 0 + 10 + false + false + false + 25 + .stfolder + false + 0 + 2 + false + standard + standard + false + true + + +
tcp://10.8.1.10:22000
+ false + false + 0 + 0 + 0 + false + 0 +
+ +
dynamic
+ false + false + 0 + 0 + 0 + false + 0 +
+ +
tcp://10.8.1.6:22000
+ false + false + 0 + 0 + 0 + false + 0 +
+ +
{{ syncthing_gui_address }}:{{ syncthing_gui_port }}
+ platvoeten + $2a$10$1WqvnXwMfqTU6072LZmxTOkpbqE2osM4G8TrdXfEfkUM1ZEC8I.CK + 6T6cWRLpeXC44ZRoe7QcaKZpHJu2Wug3 + dark +
+ + + {{ syncthing_listen_address }}:{{ syncthing_protocol_port }} + default + true + true + 21027 + [ff12::8384]:21027 + 0 + 0 + 60 + true + 10 + true + true + 60 + 30 + 10 + -1 + 2 + MfeHGcQ6 + https://data.syncthing.net/newdata + false + 1800 + true + 12 + false + 24 + false + 5 + false + 1 + https://upgrades.syncthing.net/meta.json + false + 10 + 0 + ~ + true + 0 + https://crash.syncthing.net/newcrash + true + 180 + 20 + default + auto + 0 + true + false + +
diff --git a/vars/network.yml b/vars/network.yml index 4d221ad..c21d386 100644 --- a/vars/network.yml +++ b/vars/network.yml @@ -8,8 +8,5 @@ nfs_port: 2049 gitlab_ip: '192.168.178.88' sentry_ip: '192.168.178.73' -syncthing_gui_port: 8384 -syncthing_protocol_port: 22000 - radicale_listen_addres: '127.0.0.1' radicale_port: 5232 diff --git a/vars/syncthing.yml b/vars/syncthing.yml new file mode 100644 index 0000000..70a85f3 --- /dev/null +++ b/vars/syncthing.yml @@ -0,0 +1,8 @@ +syncthing_listen_address: '10.8.0.1' +syncthing_gui_address: '10.8.0.1' + +syncthing_gui_port: 8384 +syncthing_protocol_port: 22000 + +syncthing_file_folder: '{{ ansible_env.HOME }}/files/Sync/' +syncthing_picture_folder: '{{ ansible_env.HOME }}/files/Pictures/'