Browse Source

[syncthing] Not in pkg anymore?!

Colin Powell 3 years ago
parent
commit
82e9a6d161
1 changed files with 18 additions and 0 deletions
  1. 18 0
      ansible/roles/syncthing/tasks/main.yml

+ 18 - 0
ansible/roles/syncthing/tasks/main.yml

@@ -2,6 +2,21 @@
 - name: Dependencies installed
   community.general.pkgng: name=syncthing state=latest
 
+- name: Fetched syncthing release
+  shell:
+    chdir: /tmp
+    cmd: fetch https://github.com/syncthing/syncthing/releases/download/v1.19.2/syncthing-freebsd-amd64-v1.19.2.tar.gz
+
+- name: Unpacked syncthing release
+  shell:
+    chdir: /tmp
+    cmd: tar zxf syncthing-freebsd-amd64-v1.19.2.tar.gz
+
+- name: Syncthing installed
+  shell:
+    chdir: /tmp/syncthing-freebsd-amd64-v1.19.2
+    cmd: "mv syncthing /usr/local/bin/syncthing & mv etc/freebsd-rc/syncthing /usr/local/etc/rc.d/syncthing & chmod +x /usr/local/etc/rc.d/syncthing"
+
 - name: Syncthing enabled
   shell: sysrc syncthing_enable="YES"
 
@@ -42,3 +57,6 @@
     cmd: 'sed -i -e ''s/fsWatcherEnabled="true"/fsWatcherEnabled="false"/'' /usr/local/etc/syncthing/config.xml'
     warn: false
   notify: Syncthing restarted
+
+- name: Ensure syncthing is restarted
+  service: name=syncthing state=restarted