diff --git a/roles/syncthing/tasks/main.yml b/roles/syncthing/tasks/main.yml index 4f20e25..31f05e9 100644 --- a/roles/syncthing/tasks/main.yml +++ b/roles/syncthing/tasks/main.yml @@ -10,8 +10,8 @@ path: ~/.config/syncthing state: directory - name: Copy Syncthing configuration - copy: - src: "{{ role_path }}/files/config.xml" + template: + src: "{{ role_path }}/templates/config.xml.j2" dest: ~/.config/syncthing/config.xml - name: Copy Syncthing private key copy: diff --git a/roles/syncthing/files/config.xml b/roles/syncthing/templates/config.xml.j2 similarity index 98% rename from roles/syncthing/files/config.xml rename to roles/syncthing/templates/config.xml.j2 index 0eea2e4..c2c8ce7 100644 --- a/roles/syncthing/files/config.xml +++ b/roles/syncthing/templates/config.xml.j2 @@ -109,7 +109,7 @@
127.0.0.1:40465
- + {{ syncthing.apikey }} default
@@ -134,7 +134,7 @@ 10 3 3 - + {{ syncthing.usage_report_unique_id }} https://data.syncthing.net/newdata false 1800 diff --git a/roles/syncthing/vars/main.yml b/roles/syncthing/vars/main.yml new file mode 100644 index 0000000..ad5607f --- /dev/null +++ b/roles/syncthing/vars/main.yml @@ -0,0 +1,16 @@ +syncthing: + apikey: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 63616464333437376436333362353263396536633733656431363563626364346536376331646531 + 3762666230663933633937303130356238343963323030320a643639353833616666316536326434 + 65333136656530353062303434633830343765613937386134303463323730666332353439343762 + 3230356330333565630a336239646134333364383165383662393735306566666662623237663164 + 35633538303738366538666466626666633431363134633963313739623231363065653936383131 + 6637636561393762323431303430353661396162393463646636 + usage_report_unique_id: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 65636631303566326435306335663363393362613565326638666336353139376538343631663365 + 6666643239396464326438353438323033343334363731340a376638633564626563373866353132 + 30306363303664363233303533653232386264666432303537313630373636613061633237373930 + 6434346565383833300a316334663965353066633234636564653366326436663163363733616439 + 6666