diff --git a/roles/syncthing/tasks/main.yml b/roles/syncthing/tasks/main.yml index 15069c7..8b197fe 100644 --- a/roles/syncthing/tasks/main.yml +++ b/roles/syncthing/tasks/main.yml @@ -15,8 +15,8 @@ src: "{{ role_path }}/files/cert.pem" dest: /apps/syncthing/config/cert.pem - name: Copy Syncthing configuration - copy: - src: "{{ role_path }}/files/config.xml" + template: + src: "{{ role_path }}/templates/config.xml.j2" dest: /apps/syncthing/config/config.xml - name: Create Syncthing data directory file: diff --git a/roles/syncthing/files/config.xml b/roles/syncthing/templates/config.xml.j2 similarity index 93% rename from roles/syncthing/files/config.xml rename to roles/syncthing/templates/config.xml.j2 index 2bafb46..416c42f 100644 --- a/roles/syncthing/files/config.xml +++ b/roles/syncthing/templates/config.xml.j2 @@ -45,6 +45,9 @@ basic + + + @@ -87,6 +90,16 @@ 4096 + +
dynamic
+ false + false + 0 + 0 + 0 + false + 0 +
dynamic
false @@ -109,7 +122,7 @@
0.0.0.0:8384
- + {{ syncthing.apikey }} light
diff --git a/roles/syncthing/vars/main.yml b/roles/syncthing/vars/main.yml new file mode 100644 index 0000000..7e33fce --- /dev/null +++ b/roles/syncthing/vars/main.yml @@ -0,0 +1,9 @@ +syncthing: + apikey: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 30323136343566306566323232343538306565653135303536363234636365383234366332316339 + 6363383637653032643637373662383331633933633765340a366538616134613365653261353861 + 34326533633239353339326636303762306639653839386535316639643762636239633732386165 + 3932636432643631340a633831663833323633623461646131356566383539613835613738656633 + 32336138363032613833613736333739613762343833383563633337626361363566353066636536 + 6434333037653732626537363938613463333863336134313664