From 9edab09330e29890e1bb43fa6d9f360be3baaa08 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 30 Nov 2022 22:22:45 +0100 Subject: [PATCH] add syncthing --- playbooks/files/config.xml.j2 | 160 ++++++++++++++++++++++++++++++++++ playbooks/nucs.yml | 25 +++++- 2 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 playbooks/files/config.xml.j2 diff --git a/playbooks/files/config.xml.j2 b/playbooks/files/config.xml.j2 new file mode 100644 index 0000000..0e47ba7 --- /dev/null +++ b/playbooks/files/config.xml.j2 @@ -0,0 +1,160 @@ + + + basic + + + + + + + 1 + + 3600 + + basic + + 0 + 0 + 0 + random + false + 0 + 0 + 10 + false + false + false + 25 + .stfolder + false + 0 + 2 + false + standard + standard + false + false + + +
dynamic
+ false + false + 0 + 0 + 0 + false + 0 +
+ +
dynamic
+ false + false + 0 + 0 + 0 + false + 0 +
+ +
0.0.0.0:8384
+ + + light +
+ + + default + default + true + true + 21027 + [ff12::8384]:21027 + 0 + 0 + 60 + true + 10 + true + true + 60 + 30 + 10 + -1 + 3 + + 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 + 0 + 0 + false + + + + basic + + + + 1 + + 3600 + + basic + + 0 + 0 + 0 + random + false + 0 + 0 + 10 + false + false + false + 25 + .stfolder + false + 0 + 2 + false + standard + standard + false + false + + +
dynamic
+ false + false + 0 + 0 + 0 + false + 0 +
+
+
diff --git a/playbooks/nucs.yml b/playbooks/nucs.yml index 48e05e4..271ec1f 100644 --- a/playbooks/nucs.yml +++ b/playbooks/nucs.yml @@ -51,8 +51,31 @@ git: repo: https://github.com/pizzapim/pizzeria dest: /ansible/pizzeria # TODO: parameterize? - - name: start the Docker Compose + - name: start the docker compose community.docker.docker_compose: project_src: /ansible/pizzeria pull: true remove_orphans: true +- name: Install syncthing + hosts: nucs + tasks: + - name: install syncthing + apt: + pkg: + - syncthing + state: latest + update_cache: true + - name: create syncthing user + user: + name: syncthing + home: /home/syncthing + state: present + - name: copy syncthing configuration + template: + src: "{{ playbook_dir }}/files/config.xml.j2" + dest: /home/syncthing/.config/syncthing/config.xml + - name: enable syncthing service + systemd: + name: "syncthing@syncthing" + enabled: true + state: restarted