diff --git a/templates/syncthing/config.j2 b/templates/syncthing/config.j2 index b3d1eed..88a9207 100644 --- a/templates/syncthing/config.j2 +++ b/templates/syncthing/config.j2 @@ -1,18 +1,18 @@ - {% for folder in syncthing_folders %} + {% for folder in syncthing_folders -%} - {% for id in folder.devices %} + {% for id in folder.devices -%} - {% endfor %} + {%- endfor %} basic 20 @@ -48,9 +48,9 @@ false false - {% endfor %} + {%- endfor %} - {% for device in syncthing_devices %} + {% for device in syncthing_devices -%} 0 0 - {% endfor %} + {%- endfor %}
{{ syncthing_listen_address }}:{{ syncthing_gui_port }}
diff --git a/vars/syncthing.yml b/vars/syncthing.yml index 74447c4..9f4e036 100644 --- a/vars/syncthing.yml +++ b/vars/syncthing.yml @@ -22,15 +22,15 @@ syncthing_gui_pass: !vault | syncthing_devices: - name: Desktop - id: &desktop_id CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN + id: &syncthing_desktop_id CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN address: tcp://10.0.0.3:22000 - name: Fudiggity - id: &host_id PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ + id: &syncthing_server_id ZM5JO5E-UYU6XUI-P25TLIP-TLPQD7J-NSPSYZS-A5OOYST-J62ICAQ-Y2A5YQV address: dynamic - name: XPS15 - id: &xps_id 2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH + id: &syncthing_xps_id 2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH address: tcp://10.0.0.2:22000 syncthing_folders: @@ -40,9 +40,9 @@ syncthing_folders: source_path: '{{ ansible_env.HOME }}/files/sync/' type: sendreceive devices: - - *desktop_id - - *host_id - - *xps_id + - *syncthing_desktop_id + - *syncthing_server_id + - *syncthing_xps_id - id: pictures label: Pictures @@ -50,6 +50,6 @@ syncthing_folders: source_path: '{{ ansible_env.HOME }}/files/pictures/' type: sendreceive devices: - - *desktop_id - - *host_id - - *xps_id + - *syncthing_desktop_id + - *syncthing_server_id + - *syncthing_xps_id