Update syncthing configuration

This commit is contained in:
Sonny Bakker 2025-03-13 22:40:27 +01:00
parent d148eca9b7
commit 171426a358
12 changed files with 303 additions and 292 deletions

View file

@ -22,10 +22,10 @@
daemon-reload: true
scope: user
- name: restart syncthing
- name: start syncthing
systemd:
name: syncthing
state: restarted
state: started
enabled: true
scope: user

View file

@ -6,9 +6,33 @@
community.general.pacman:
name: '{{ packages }}'
- name: Detect platform
ansible.builtin.import_tasks: 'tasks/platform.yml'
- name: Platform vars
tags: platform_vars
block:
- name: Detect platform
ansible.builtin.command: laptop-detect
register: is_laptop
failed_when: is_laptop.rc == 2
- name: Set platform (desktop)
ansible.builtin.set_fact:
platform: desktop
when: is_laptop.rc == 1
- name: Set platform (laptop)
ansible.builtin.set_fact:
platform: laptop
when: is_laptop.rc == 0
- name: Load desktop specific vars
ansible.builtin.include_vars:
dir: vars/desktop
when: platform == 'desktop'
- name: Load laptop specific vars
ansible.builtin.include_vars:
dir: vars/laptop
when: platform == 'laptop'
- name: Install platform specific packages
become: true

View file

@ -1,14 +1,18 @@
- name: create configuration dir
file:
- name: Create configuration dir
ansible.builtin.file:
path: '{{ xdg_config_dir }}/syncthing'
state: directory
mode: '0755'
# Syncthing config files should not be overwritten,
# see https://docs.syncthing.net/users/config.html#config-file-format
- name: copy configuration file
template:
src: 'templates/{{ platform }}/syncthing.j2'
- name: Stop syncthing service
ansible.builtin.systemd:
name: syncthing
scope: user
state: stopped
- name: Copy configuration file
ansible.builtin.template:
src: 'templates/syncthing.j2'
dest: '{{ xdg_config_dir }}/syncthing/config.xml'
mode: '0600'
force: false
notify: restart syncthing
mode: '0640'
notify: start syncthing

View file

@ -1,132 +0,0 @@
<configuration version="32">
<folder id="Pictures" label="Pictures" path="/home/sonny/Pictures/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN" introducedBy=""></device>
<device id="PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ" introducedBy=""></device>
<minDiskFree unit="">0</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>0</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>true</junctionsAsDirs>
</folder>
<folder id="default" label="Default Folder" path="/home/sonny/Sync" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN" introducedBy=""></device>
<device id="PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ" introducedBy=""></device>
<minDiskFree unit="">0</minDiskFree>
<versioning type="simple">
<param key="keep" val="5"></param>
<cleanupIntervalS>3600</cleanupIntervalS>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>-1</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>0</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>true</junctionsAsDirs>
</folder>
<device id="CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN" name="Desktop" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<address>dynamic</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
</device>
<device id="PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ" name="Zeus" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<address>tcp://10.0.0.1:22000</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
</device>
<gui enabled="true" tls="true" debugging="false">
<address>127.0.0.1:8384</address>
<apikey>Qo5fAhxR7LnwvJ7eGYr4gigkHm2LrT6y</apikey>
<theme>dark</theme>
</gui>
<ldap></ldap>
<options>
<listenAddress>default</listenAddress>
<globalAnnounceServer>default</globalAnnounceServer>
<globalAnnounceEnabled>true</globalAnnounceEnabled>
<localAnnounceEnabled>true</localAnnounceEnabled>
<localAnnouncePort>21027</localAnnouncePort>
<localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<reconnectionIntervalS>60</reconnectionIntervalS>
<relaysEnabled>true</relaysEnabled>
<relayReconnectIntervalM>10</relayReconnectIntervalM>
<startBrowser>true</startBrowser>
<natEnabled>true</natEnabled>
<natLeaseMinutes>60</natLeaseMinutes>
<natRenewalMinutes>30</natRenewalMinutes>
<natTimeoutSeconds>10</natTimeoutSeconds>
<urAccepted>3</urAccepted>
<urSeen>0</urSeen>
<urUniqueID>rxdDP3h2</urUniqueID>
<urURL>https://data.syncthing.net/newdata</urURL>
<urPostInsecurely>false</urPostInsecurely>
<urInitialDelayS>1800</urInitialDelayS>
<restartOnWakeup>true</restartOnWakeup>
<autoUpgradeIntervalH>12</autoUpgradeIntervalH>
<upgradeToPreReleases>false</upgradeToPreReleases>
<keepTemporariesH>24</keepTemporariesH>
<cacheIgnoredFiles>false</cacheIgnoredFiles>
<progressUpdateIntervalS>5</progressUpdateIntervalS>
<limitBandwidthInLan>false</limitBandwidthInLan>
<minHomeDiskFree unit="%">1</minHomeDiskFree>
<releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
<overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
<tempIndexMinBlocks>10</tempIndexMinBlocks>
<unackedNotificationID>authenticationUserAndPassword</unackedNotificationID>
<trafficClass>0</trafficClass>
<defaultFolderPath>~</defaultFolderPath>
<setLowPriority>true</setLowPriority>
<maxFolderConcurrency>0</maxFolderConcurrency>
<crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
<crashReportingEnabled>true</crashReportingEnabled>
<stunKeepaliveStartS>180</stunKeepaliveStartS>
<stunKeepaliveMinS>20</stunKeepaliveMinS>
<stunServer>default</stunServer>
<databaseTuning>auto</databaseTuning>
<maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
</options>
</configuration>

View file

@ -1,132 +0,0 @@
<configuration version="32">
<folder id="Pictures" label="Pictures" path="/home/sonny/Pictures/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ" introducedBy=""></device>
<device id="2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH" introducedBy=""></device>
<minDiskFree unit="">0</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>0</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>true</junctionsAsDirs>
</folder>
<folder id="default" label="Sync" path="/home/sonny/Sync" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ" introducedBy=""></device>
<device id="2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH" introducedBy=""></device>
<minDiskFree unit="">0</minDiskFree>
<versioning type="simple">
<param key="keep" val="5"></param>
<cleanupIntervalS>3600</cleanupIntervalS>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>0</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>true</junctionsAsDirs>
</folder>
<device id="PGSOVGQ-VOHWV77-F7DFFQO-JZKTWWG-Z2XU2DE-N4ATK5U-F7MXKKM-TFSROQJ" name="Zeus" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<address>tcp://10.0.0.1:22000</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
</device>
<device id="2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH" name="XPS" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<address>dynamic</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
</device>
<gui enabled="true" tls="true" debugging="false">
<address>127.0.0.1:8384</address>
<apikey>2y25PxNtQjtDoe6qnDSiWpmSMpJnvoyi</apikey>
<theme>dark</theme>
</gui>
<ldap></ldap>
<options>
<listenAddress>default</listenAddress>
<globalAnnounceServer>default</globalAnnounceServer>
<globalAnnounceEnabled>true</globalAnnounceEnabled>
<localAnnounceEnabled>true</localAnnounceEnabled>
<localAnnouncePort>21027</localAnnouncePort>
<localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<reconnectionIntervalS>60</reconnectionIntervalS>
<relaysEnabled>true</relaysEnabled>
<relayReconnectIntervalM>10</relayReconnectIntervalM>
<startBrowser>true</startBrowser>
<natEnabled>true</natEnabled>
<natLeaseMinutes>60</natLeaseMinutes>
<natRenewalMinutes>30</natRenewalMinutes>
<natTimeoutSeconds>10</natTimeoutSeconds>
<urAccepted>-1</urAccepted>
<urSeen>0</urSeen>
<urUniqueID>A3FvpLVX</urUniqueID>
<urURL>https://data.syncthing.net/newdata</urURL>
<urPostInsecurely>false</urPostInsecurely>
<urInitialDelayS>1800</urInitialDelayS>
<restartOnWakeup>true</restartOnWakeup>
<autoUpgradeIntervalH>12</autoUpgradeIntervalH>
<upgradeToPreReleases>false</upgradeToPreReleases>
<keepTemporariesH>24</keepTemporariesH>
<cacheIgnoredFiles>false</cacheIgnoredFiles>
<progressUpdateIntervalS>5</progressUpdateIntervalS>
<limitBandwidthInLan>false</limitBandwidthInLan>
<minHomeDiskFree unit="%">1</minHomeDiskFree>
<releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
<overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
<tempIndexMinBlocks>10</tempIndexMinBlocks>
<unackedNotificationID>authenticationUserAndPassword</unackedNotificationID>
<trafficClass>0</trafficClass>
<defaultFolderPath>~</defaultFolderPath>
<setLowPriority>true</setLowPriority>
<maxFolderConcurrency>0</maxFolderConcurrency>
<crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
<crashReportingEnabled>true</crashReportingEnabled>
<stunKeepaliveStartS>180</stunKeepaliveStartS>
<stunKeepaliveMinS>20</stunKeepaliveMinS>
<stunServer>default</stunServer>
<databaseTuning>auto</databaseTuning>
<maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
</options>
</configuration>

152
templates/syncthing.j2 Normal file
View file

@ -0,0 +1,152 @@
<!-- {{ ansible_managed }} -->
<configuration version="{{ syncthing_config_version }}">
{% for folder in syncthing_folders -%}
<folder
id="{{ folder.id }}"
label="{{ folder.label }}"
path="{{ folder.path }}"
type="{{ folder.type }}">
{% for id in folder.devices -%}
<device id="{{ id }}">
<encryptionPassword></encryptionPassword>
</device>
{%- endfor %}
<filesystemType>basic</filesystemType>
<minDiskFree unit="%">20</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
<fsPath></fsPath>
<fsType>basic</fsType>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>-1</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>2</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>false</junctionsAsDirs>
<syncOwnership>false</syncOwnership>
<sendOwnership>false</sendOwnership>
<syncXattrs>false</syncXattrs>
<sendXattrs>false</sendXattrs>
</folder>
{%- endfor %}
{% for device in syncthing_devices -%}
<device
id="{{ device.id }}"
name="{{ device.name }}"
compression="metadata">
<address>{{ device.address }}</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
<untrusted>false</untrusted>
<remoteGUIPort>0</remoteGUIPort>
<numConnections>0</numConnections>
</device>
{%- endfor %}
<gui enabled="true" tls="true" debugging="false">
<address>{{ syncthing_listen_address }}:{{ syncthing_gui_port }}</address>
<apikey>{{ syncthing_api_key }}</apikey>
<theme>default</theme>
<insecureAdminAccess>true</insecureAdminAccess>
</gui>
<options>
<listenAddress>tcp://{{ syncthing_listen_address }}:{{ syncthing_protocol_port }}</listenAddress>
</options>
<defaults>
<folder
id=""
label=""
path="~"
type="sendreceive"
rescanIntervalS="3600"
fsWatcherEnabled="true"
fsWatcherDelayS="10"
fsWatcherTimeoutS="0"
ignorePerms="false"
autoNormalize="true">
<filesystemType>basic</filesystemType>
<device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" introducedBy="">
<encryptionPassword></encryptionPassword>
</device>
<minDiskFree unit="%">1</minDiskFree>
<versioning>
<cleanupIntervalS>3600</cleanupIntervalS>
<fsPath></fsPath>
<fsType>basic</fsType>
</versioning>
<copiers>0</copiers>
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
<hashers>0</hashers>
<order>random</order>
<ignoreDelete>false</ignoreDelete>
<scanProgressIntervalS>0</scanProgressIntervalS>
<pullerPauseS>0</pullerPauseS>
<maxConflicts>10</maxConflicts>
<disableSparseFiles>false</disableSparseFiles>
<disableTempIndexes>false</disableTempIndexes>
<paused>false</paused>
<weakHashThresholdPct>25</weakHashThresholdPct>
<markerName>.stfolder</markerName>
<copyOwnershipFromParent>false</copyOwnershipFromParent>
<modTimeWindowS>0</modTimeWindowS>
<maxConcurrentWrites>2</maxConcurrentWrites>
<disableFsync>false</disableFsync>
<blockPullOrder>standard</blockPullOrder>
<copyRangeMethod>standard</copyRangeMethod>
<caseSensitiveFS>false</caseSensitiveFS>
<junctionsAsDirs>false</junctionsAsDirs>
</folder>
<device
id=""
compression="metadata"
introducer="false"
skipIntroductionRemovals="false"
introducedBy="">
<address>dynamic</address>
<paused>false</paused>
<autoAcceptFolders>false</autoAcceptFolders>
<maxSendKbps>0</maxSendKbps>
<maxRecvKbps>0</maxRecvKbps>
<maxRequestKiB>0</maxRequestKiB>
<untrusted>false</untrusted>
<remoteGUIPort>0</remoteGUIPort>
<numConnections>0</numConnections>
</device>
<ignores>
<line>(?d).DS_Store</line>
</ignores>
</defaults>
</configuration>

View file

@ -0,0 +1,45 @@
syncthing_listen_address: '0.0.0.0'
syncthing_protocol_port: 22000
syncthing_gui_port: 8384
syncthing_config_version: 37
syncthing_api_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
39643534383666343331666336356662333165633032356532323730316535616363393330376263
6164323430343961646635323739373363623764646361360a666566363736323739313533323562
34653032646230313063613265313836383033353336333461376432363530633632313234323733
6162646332623837370a646537336139336361666336363861353030633136373063333433643435
64666465356566313263376330643664313266646139663433663366316232613562663863366334
3061663839656563353663373135393233653130383735366538
syncthing_devices:
- name: Desktop
id: &syncthing_desktop_id CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN
address: dynamic
- name: Fudiggity
id: &syncthing_server_id ZM5JO5E-UYU6XUI-P25TLIP-TLPQD7J-NSPSYZS-A5OOYST-J62ICAQ-Y2A5YQV
address: tcp://syncthing.{{ server_domain }}:22000
- name: XPS15
id: &syncthing_xps_id 2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH
address: tcp://10.0.0.2:22000
syncthing_folders:
- id: default
label: Default
path: '{{ ansible_env.HOME }}/syncthing/default'
type: sendreceive
devices:
- *syncthing_desktop_id
- *syncthing_server_id
- *syncthing_xps_id
- id: pictures
label: Pictures
path: '{{ ansible_env.HOME }}/syncthing/pictures'
type: sendreceive
devices:
- *syncthing_desktop_id
- *syncthing_server_id
- *syncthing_xps_id

View file

@ -5,20 +5,20 @@ vpn_default:
interface: 'wg0'
dns: '10.0.0.1'
domains:
- ~vpn.fudiggity.nl
- ~transmission.fudiggity.nl
- '~vpn.{{ server_domain }}'
- '~transmission.{{ server_domain }}'
public_key_path: '{{ vpn_config_dir }}/keys/public/default/desktop.pub'
private_key_path: '{{ vpn_config_dir }}/keys/private/default/desktop.key'
peers:
- name: 'zeus'
- name: 'fudiggity'
allowed_ips:
- address: '10.0.0.0/24'
create_route: false
- address: '172.16.238.0/24'
create_route: true
endpoint: 'fudiggity.nl:51902'
endpoint: '{{ server_domain }}:51902'
public_key: 'CeybSMpJiicXmndIuhe89Bay3z3PEdYNyAwIFsacBEo='
preshared_key_path: '{{ vpn_config_dir }}/keys/private/default/preshared-zeus.psk'
preshared_key_source_path: 'files/desktop/wireguard/default/preshared.psk'
@ -29,7 +29,7 @@ vpn_media:
interface: 'wg1'
dns: '10.0.1.1'
domains:
- ~media-vpn.fudiggity.nl
- '~media-vpn.{{ server_domain }}'
public_key_path: '{{ vpn_config_dir }}/keys/public/media/desktop.pub'
private_key_path: '{{ vpn_config_dir }}/keys/private/media/desktop.key'
@ -40,7 +40,7 @@ vpn_media:
allowed_ips:
- address: '10.0.1.0/24'
create_route: false
endpoint: 'fudiggity.nl:51903'
endpoint: '{{ server_domain }}.nl:51903'
public_key: 'EugKeo63C5N5kz9ShMHtYswO9Qh6mE00MtfLSFmqqjg='
preshared_key_path: '{{ vpn_config_dir }}/keys/private/media/preshared-zeus.psk'
preshared_key_source_path: 'files/desktop/wireguard/media/preshared.psk'

45
vars/laptop/syncthing.yml Normal file
View file

@ -0,0 +1,45 @@
syncthing_listen_address: '0.0.0.0'
syncthing_protocol_port: 22000
syncthing_gui_port: 8384
syncthing_config_version: 37
syncthing_api_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
35346637623066636261633331343438313736356137633466306633613563343630363565643763
6631623461663330633537386539376435356338393537620a666234373932636162653830316339
65336339383630313837323137613137303862613061326131313437316637383637666638313235
6463333235646536620a316163666431323530353330356633393035663933613761313031656561
66333431636134366466373533616438326230323965333763316336393764303737663461363636
3061373832313462623765353130616237343966333332623262
syncthing_devices:
- name: Desktop
id: &syncthing_desktop_id CSDXP5E-4UBNC36-32EHTPK-L6Y6JVZ-HQHM42R-FJXN2LI-2MTYRFX-3ZZPUQN
address: tcp://10.0.0.3:22000
- name: Fudiggity
id: &syncthing_server_id ZM5JO5E-UYU6XUI-P25TLIP-TLPQD7J-NSPSYZS-A5OOYST-J62ICAQ-Y2A5YQV
address: tcp://syncthing.{{ server_domain }}:22000
- name: XPS15
id: &syncthing_xps_id 2AC4LRC-YIJDWWK-YCOEZLT-4OWWC2E-7VEZQQB-F3AAPZR-HU75FE4-PGWWXQH
address: dynamic
syncthing_folders:
- id: default
label: Default
path: '{{ ansible_env.HOME }}/syncthing/default'
type: sendreceive
devices:
- *syncthing_desktop_id
- *syncthing_server_id
- *syncthing_xps_id
- id: pictures
label: Pictures
path: '{{ ansible_env.HOME }}/syncthing/pictures'
type: sendreceive
devices:
- *syncthing_desktop_id
- *syncthing_server_id
- *syncthing_xps_id

View file

@ -4,20 +4,23 @@ vpn_default:
interface: 'wg0'
dns: '10.0.0.1'
domains:
- ~vpn.fudiggity.nl
- ~transmission.fudiggity.nl
- '~vpn.{{ server_domain }}'
- '~transmission.{{ server_domain }}'
- '~syncthing.{{ server_domain }}'
public_key_path: '{{ vpn_config_dir }}/keys/public/default/laptop.pub'
private_key_path: '{{ vpn_config_dir }}/keys/private/default/laptop.key'
peers:
- name: 'zeus'
- name: 'fudiggity'
allowed_ips:
- address: '10.0.0.0/24'
create_route: false
- address: '172.16.238.0/24'
create_route: true
endpoint: 'fudiggity.nl:51902'
- address: '172.32.238.0/24'
create_route: true
endpoint: '{{ server_domain }}:51902'
public_key: 'CeybSMpJiicXmndIuhe89Bay3z3PEdYNyAwIFsacBEo='
preshared_key_path: '{{ vpn_config_dir }}/keys/private/default/preshared-zeus.psk'
preshared_key_source_path: 'files/laptop/wireguard/default/preshared.psk'
@ -28,17 +31,17 @@ vpn_media:
interface: 'wg1'
dns: '10.0.1.1'
domains:
- ~media-vpn.fudiggity.nl
- '~media-vpn.{{ server_domain }}'
public_key_path: '{{ vpn_config_dir }}/keys/public/media/laptop.pub'
private_key_path: '{{ vpn_config_dir }}/keys/private/media/laptop.key'
peers:
- name: 'zeus-media'
- name: 'fudiggity-media'
allowed_ips:
- address: '10.0.1.0/24'
create_route: false
endpoint: 'fudiggity.nl:51903'
endpoint: '{{ server_domain }}:51903'
public_key: 'EugKeo63C5N5kz9ShMHtYswO9Qh6mE00MtfLSFmqqjg='
preshared_key_path: '{{ vpn_config_dir }}/keys/private/media/preshared-zeus.psk'
preshared_key_source_path: 'files/laptop/wireguard/media/preshared.psk'

View file

@ -47,3 +47,5 @@ mkinitcpio_templates: []
boot_configuration:
vpn_config_dir: '/etc/wireguard'
server_domain: fudiggity.nl

View file

@ -1,7 +1,7 @@
mpd_listen_address: '127.0.0.1'
mpd_listen_port: '6600'
mpd_remote_address: 'vpn.fudiggity.nl'
mpd_remote_address: 'vpn.{{ server_domain }}'
mpd_remote_port: '21000'
mpd_remote_stream_port: '8000' # note that this is not used (yet)