add syncthing stack
This commit is contained in:
parent
4678724dcf
commit
70b9ec605f
12 changed files with 499 additions and 3 deletions
|
@ -1 +0,0 @@
|
||||||
in traefik role: create docker overlay network
|
|
|
@ -3,6 +3,7 @@ roles_path=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
|
||||||
inventory=inventory
|
inventory=inventory
|
||||||
interpreter_python=/usr/bin/python3
|
interpreter_python=/usr/bin/python3
|
||||||
remote_user = root
|
remote_user = root
|
||||||
|
vault_password_file=util/secret-service-client.sh
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
always = True
|
always = True
|
||||||
|
|
|
@ -3,6 +3,7 @@ docker_node_labels:
|
||||||
labels:
|
labels:
|
||||||
traefik: "true"
|
traefik: "true"
|
||||||
- hostname: worker1
|
- hostname: worker1
|
||||||
labels: {}
|
labels:
|
||||||
|
syncthing: "true"
|
||||||
|
|
||||||
data_directories: []
|
data_directories: []
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
data_directories: []
|
data_directories:
|
||||||
|
- 'syncthing'
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
hosts: manager
|
hosts: manager
|
||||||
roles:
|
roles:
|
||||||
- {role: traefik, tags: traefik}
|
- {role: traefik, tags: traefik}
|
||||||
|
- {role: syncthing, tags: syncthing}
|
||||||
|
|
45
ansible/roles/syncthing/cert.pem
Normal file
45
ansible/roles/syncthing/cert.pem
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
37326262373466303939623263623234616338316165316466656131326339306233303834396263
|
||||||
|
3139663539356264323038306635363934363364653437350a666438396563643339353765306131
|
||||||
|
39653434373966346166323938666364323562313334323262643666373463623536363635643163
|
||||||
|
3430353230326634320a643532663765663632623031313463653765643134313538633131613663
|
||||||
|
64393533636138323833343630363639656539376163353239313231646662316532666631623734
|
||||||
|
31343364393363623164336339303631366162376131613736636131396165663835653433303134
|
||||||
|
62323265633039633865326366613366653435653261633662613737353463633663383635303562
|
||||||
|
39303933343139363132393035336332363438656333646136333330326533623763393263663563
|
||||||
|
36343038393264383639346436316134386531383338386461363538613135663863363434623339
|
||||||
|
31373236353337653838396333643638343232653066313662393165343062396137326630646430
|
||||||
|
31646566356565386532626433383163643635643930326164353766323263616665636435323339
|
||||||
|
38373837393035343737356134373831303831316464666637333231343434316632316464356564
|
||||||
|
31613464633761306330303637386230333430396665383262333530336137336236623838326333
|
||||||
|
30393861666439623536336231616563303764646563393065353432313965343330633463313564
|
||||||
|
66373539373265353765636438393633613839393830366135323139666533393165653736666335
|
||||||
|
35303736623534653635343636383662316134376332393239633262363939396263363264616637
|
||||||
|
35396261346264373930396462393638316335363833333132393061633337626331323439363131
|
||||||
|
39306264386133316137633039366638356130616438373433333635666231366136613363626133
|
||||||
|
31316230336534616430633232623430666234643836636338613730356335623434373433643935
|
||||||
|
62623266313834353163623439616533623135396134346164373363643364373939396163363837
|
||||||
|
36313432393965653664633231393564323936323933313565323337346333313233396666626361
|
||||||
|
65383031326630313263343862653063613839373131643265656237623232663761383665333939
|
||||||
|
33376531623665653037333563333034363363333435343439663761633734616461353961323434
|
||||||
|
66643833353539623265616262383265396237636631346433386638643436383230333438653462
|
||||||
|
37383235316634353262316436653163316164356261353663663565396630613434396231353538
|
||||||
|
38633330326266303838346365663839646163623264633934363938666234393131356138656439
|
||||||
|
31333161643136633836343262326136393964393635623634316532393837376162383835303435
|
||||||
|
30643339356434386264643163316165396534373064346334636132316230346437363665636563
|
||||||
|
38333835306666626637386562306433373031366136616635623765393630383939353335393930
|
||||||
|
61663832383239643363626137343661366436653864643339316537383738323335333866633537
|
||||||
|
39316339383239323131653232633833363536313431643364313937633037336564386339383433
|
||||||
|
38303939303835386263633430383061336436383062663462353762376666613530313663623261
|
||||||
|
66616266373136326433363338303365653230663763636630353034383832633239383932616365
|
||||||
|
37373236396631623866656330623632313538326330626363316262653566383633666531383738
|
||||||
|
34353830373137343236343765393665356534356238353861326165303939363236626130626363
|
||||||
|
64623164383866393630656232373164343163363433643835396236363132346235356134613564
|
||||||
|
66383364623962316564373564363631356234386535653465633864313365396438356235313163
|
||||||
|
35633366663836666337653537336334353935323364306635383238373664613530353365323366
|
||||||
|
31373831383336336237633064313938393637636231356165656631386132313734333439643733
|
||||||
|
62666435363535303530323866623139653138643831623838316432366539316236306133393764
|
||||||
|
63386133333832356365396137623332643539633236343762353138386434303632373932336139
|
||||||
|
39396364653864316435356434383761306238633164643939363864356362633135623438363861
|
||||||
|
64626339663931383133383862313031383638653266306539643061316238616266656136656530
|
||||||
|
63666239303034396133
|
339
ansible/roles/syncthing/config.xml.j2
Normal file
339
ansible/roles/syncthing/config.xml.j2
Normal file
|
@ -0,0 +1,339 @@
|
||||||
|
<configuration version="37">
|
||||||
|
<folder id="6pgsm-opvsv" label="Sync" path="/data/sync" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
|
<filesystemType>basic</filesystemType>
|
||||||
|
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" 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>
|
||||||
|
<syncOwnership>false</syncOwnership>
|
||||||
|
<sendOwnership>false</sendOwnership>
|
||||||
|
<syncXattrs>false</syncXattrs>
|
||||||
|
<sendXattrs>false</sendXattrs>
|
||||||
|
<xattrFilter>
|
||||||
|
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||||
|
<maxTotalSize>4096</maxTotalSize>
|
||||||
|
</xattrFilter>
|
||||||
|
</folder>
|
||||||
|
<folder id="gfx9s-zaxrt" label="Music" path="/data/music" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
|
<filesystemType>basic</filesystemType>
|
||||||
|
<device id="B4Y7T5D-PHHDOFH-ZZ4VGOK-YNJINJG-VCYC272-PIE24XA-XJ5HSOD-DF3T6AJ" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" 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>
|
||||||
|
<syncOwnership>false</syncOwnership>
|
||||||
|
<sendOwnership>false</sendOwnership>
|
||||||
|
<syncXattrs>false</syncXattrs>
|
||||||
|
<sendXattrs>false</sendXattrs>
|
||||||
|
<xattrFilter>
|
||||||
|
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||||
|
<maxTotalSize>4096</maxTotalSize>
|
||||||
|
</xattrFilter>
|
||||||
|
</folder>
|
||||||
|
<folder id="sjpmp-qavt4" label="Uni" path="/data/uni" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
|
<filesystemType>basic</filesystemType>
|
||||||
|
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" 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>
|
||||||
|
<syncOwnership>false</syncOwnership>
|
||||||
|
<sendOwnership>false</sendOwnership>
|
||||||
|
<syncXattrs>false</syncXattrs>
|
||||||
|
<sendXattrs>false</sendXattrs>
|
||||||
|
<xattrFilter>
|
||||||
|
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||||
|
<maxTotalSize>4096</maxTotalSize>
|
||||||
|
</xattrFilter>
|
||||||
|
</folder>
|
||||||
|
<folder id="tj35a-felne" label="Keepass" path="/data/keepass" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
|
<filesystemType>basic</filesystemType>
|
||||||
|
<device id="B4Y7T5D-PHHDOFH-ZZ4VGOK-YNJINJG-VCYC272-PIE24XA-XJ5HSOD-DF3T6AJ" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" introducedBy="">
|
||||||
|
<encryptionPassword></encryptionPassword>
|
||||||
|
</device>
|
||||||
|
<device id="VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" 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>
|
||||||
|
<syncOwnership>false</syncOwnership>
|
||||||
|
<sendOwnership>false</sendOwnership>
|
||||||
|
<syncXattrs>false</syncXattrs>
|
||||||
|
<sendXattrs>false</sendXattrs>
|
||||||
|
<xattrFilter>
|
||||||
|
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||||
|
<maxTotalSize>4096</maxTotalSize>
|
||||||
|
</xattrFilter>
|
||||||
|
</folder>
|
||||||
|
<device id="B4Y7T5D-PHHDOFH-ZZ4VGOK-YNJINJG-VCYC272-PIE24XA-XJ5HSOD-DF3T6AJ" name="Smartphone" 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>
|
||||||
|
</device>
|
||||||
|
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" name="max" 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>
|
||||||
|
</device>
|
||||||
|
<device id="QW4NXKY-Y56F7ON-SIABMBI-EHMQANC-AVWEREO-B6WNTCN-NP2O7VI-6SGYMQS" name="Laptop" 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>
|
||||||
|
</device>
|
||||||
|
<device id="VL7HPMP-CKHKLPH-MHSN6PG-MFGKPYP-RBEMD3R-RLXT2ZI-KU36NKF-TRK5JAU" name="OS3" 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>
|
||||||
|
</device>
|
||||||
|
<gui enabled="true" tls="false" debugging="false">
|
||||||
|
<address>0.0.0.0:8384</address>
|
||||||
|
<apikey>{{ api_key }}</apikey>
|
||||||
|
<theme>light</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>3</urSeen>
|
||||||
|
<urUniqueID></urUniqueID>
|
||||||
|
<urURL>https://data.syncthing.net/newdata</urURL>
|
||||||
|
<urPostInsecurely>false</urPostInsecurely>
|
||||||
|
<urInitialDelayS>1800</urInitialDelayS>
|
||||||
|
<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>
|
||||||
|
<trafficClass>0</trafficClass>
|
||||||
|
<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>
|
||||||
|
<announceLANAddresses>true</announceLANAddresses>
|
||||||
|
<sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>
|
||||||
|
<connectionLimitEnough>0</connectionLimitEnough>
|
||||||
|
<connectionLimitMax>0</connectionLimitMax>
|
||||||
|
<insecureAllowOldTLSVersions>false</insecureAllowOldTLSVersions>
|
||||||
|
</options>
|
||||||
|
<defaults>
|
||||||
|
<folder id="" label="" path="~" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
|
||||||
|
<filesystemType>basic</filesystemType>
|
||||||
|
<device id="IGS4TYV-TQ6X2CG-OE3M2RE-DKZWKQZ-HEKIGHT-C6EIGHL-CBP2ULE-M3WZ7QC" 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>
|
||||||
|
<syncOwnership>false</syncOwnership>
|
||||||
|
<sendOwnership>false</sendOwnership>
|
||||||
|
<syncXattrs>false</syncXattrs>
|
||||||
|
<sendXattrs>false</sendXattrs>
|
||||||
|
<xattrFilter>
|
||||||
|
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
||||||
|
<maxTotalSize>4096</maxTotalSize>
|
||||||
|
</xattrFilter>
|
||||||
|
</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>
|
||||||
|
</device>
|
||||||
|
<ignores></ignores>
|
||||||
|
</defaults>
|
||||||
|
</configuration>
|
42
ansible/roles/syncthing/docker-stack.yml.j2
Normal file
42
ansible/roles/syncthing/docker-stack.yml.j2
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# vi: ft=yaml
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
configs:
|
||||||
|
config:
|
||||||
|
file: /srv/syncthing/config.xml
|
||||||
|
private_key:
|
||||||
|
file: /srv/syncthing/key.pem
|
||||||
|
certificate:
|
||||||
|
file: /srv/syncthing/cert.pem
|
||||||
|
|
||||||
|
services:
|
||||||
|
syncthing:
|
||||||
|
image: lscr.io/linuxserver/syncthing:latest
|
||||||
|
deploy:
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- "node.labels.syncthing == true"
|
||||||
|
labels:
|
||||||
|
- traefik.enable=false
|
||||||
|
- com.centurylinklabs.watchtower.enable=false
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Amsterdam
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: /mnt/data/syncthing
|
||||||
|
target: /data
|
||||||
|
ports:
|
||||||
|
- 8384:8384
|
||||||
|
configs:
|
||||||
|
- source: config
|
||||||
|
target: /config/config.xml
|
||||||
|
- source: private_key
|
||||||
|
target: /config/key.pem
|
||||||
|
uid: '1000'
|
||||||
|
gid: '1000'
|
||||||
|
- source: certificate
|
||||||
|
target: /config/cert.pem
|
||||||
|
uid: '1000'
|
||||||
|
gid: '1000'
|
20
ansible/roles/syncthing/key.pem
Normal file
20
ansible/roles/syncthing/key.pem
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
31373963666334633437386361353532396162653439373964333935643065383836383537336238
|
||||||
|
3065306235363835343330393366326630383163633664300a653635653932663566376165623030
|
||||||
|
33666262643032383764343134326439363536353439363134353432373263316164373139633838
|
||||||
|
6336363735333862360a386235366434656336333762343330633030613437626262353934636163
|
||||||
|
38376431343934373637343631373962653262613766393561383631303563383935616630663833
|
||||||
|
62363533616235303834376233663033373531666632313237303661653265613061373131646266
|
||||||
|
31643839386134383934623632336538386462626261613039306432366564616162366435363331
|
||||||
|
34663464386630373134346264386334376334336363623137363831326338323234373662653932
|
||||||
|
33373331663065336230313731303139653036646261643535393662633165356632306536393530
|
||||||
|
30363066373064353936313461663235386465323734636263323063333365633066633736336436
|
||||||
|
38623966353634356636343833653131646131633536383339663433306130386461303735323632
|
||||||
|
64646465373533306266353932653561623363396137383532373734653462346239646562353136
|
||||||
|
64313539383566663939663734333565643637376239383337363066373639613934303633343762
|
||||||
|
37646565666635363231396139326536356533343065333731656363613731333136636561376430
|
||||||
|
35356432373537363034653231636465303135363534323766333530353433663462653837643162
|
||||||
|
39616664636464343435643039646362336634333561356438386262653231323033343662383138
|
||||||
|
66633534336232663438666632373966613335396639383836666333656235376339343538313838
|
||||||
|
39356165323361386535306664643537363764393365363639366637343332306537653962396339
|
||||||
|
323030323036393662646636303330666561
|
30
ansible/roles/syncthing/tasks/main.yml
Normal file
30
ansible/roles/syncthing/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
- name: Create working directory
|
||||||
|
file:
|
||||||
|
path: /srv/syncthing
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Copy config file
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/config.xml.j2"
|
||||||
|
dest: /srv/syncthing/config.xml
|
||||||
|
|
||||||
|
- name: Copy private key
|
||||||
|
copy:
|
||||||
|
src: "{{ role_path }}/key.pem"
|
||||||
|
dest: /srv/syncthing/key.pem
|
||||||
|
|
||||||
|
- name: Copy certificate
|
||||||
|
copy:
|
||||||
|
src: "{{ role_path }}/cert.pem"
|
||||||
|
dest: /srv/syncthing/cert.pem
|
||||||
|
|
||||||
|
- name: Copy Docker stack file
|
||||||
|
template:
|
||||||
|
src: "{{ role_path }}/docker-stack.yml.j2"
|
||||||
|
dest: /srv/syncthing/docker-stack.yml
|
||||||
|
|
||||||
|
- name: Deploy Docker stack
|
||||||
|
docker_stack:
|
||||||
|
name: syncthing
|
||||||
|
compose:
|
||||||
|
- /srv/syncthing/docker-stack.yml
|
8
ansible/roles/syncthing/vars/main.yml
Normal file
8
ansible/roles/syncthing/vars/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
api_key: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
30323136343566306566323232343538306565653135303536363234636365383234366332316339
|
||||||
|
6363383637653032643637373662383331633933633765340a366538616134613365653261353861
|
||||||
|
34326533633239353339326636303762306639653839386535316639643762636239633732386165
|
||||||
|
3932636432643631340a633831663833323633623461646131356566383539613835613738656633
|
||||||
|
32336138363032613833613736333739613762343833383563633337626361363566353066636536
|
||||||
|
6434333037653732626537363938613463333863336134313664
|
9
ansible/util/secret-service-client.sh
Executable file
9
ansible/util/secret-service-client.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pass=`secret-tool lookup ansible_vault shoarma`
|
||||||
|
retval=$?
|
||||||
|
|
||||||
|
if [ $retval -ne 0 ]; then
|
||||||
|
read -s pass
|
||||||
|
fi
|
||||||
|
echo $pass
|
Reference in a new issue