Mercurial > code > home > repos > infra
annotate sync.py @ 145:ee0384eebee5
minor
author | drewp@bigasterisk.com |
---|---|
date | Sat, 11 Mar 2023 11:22:48 -0800 |
parents | 8b8ef9d8f0fd |
children | 2065998876e4 |
rev | line source |
---|---|
14 | 1 from pyinfra import host |
2 from pyinfra.operations import apt, systemd | |
3 | |
92
a915000bad75
bang has a local (drewp) syncthing now
drewp@bigasterisk.com
parents:
23
diff
changeset
|
4 # primary instance is in k8s (/my/serv/filesync/syncthing); the rest are run with systemd. |
14 | 5 # Configs are in ~/.config/syncthing/ on each box |
92
a915000bad75
bang has a local (drewp) syncthing now
drewp@bigasterisk.com
parents:
23
diff
changeset
|
6 if host.name in ['dash', 'dot', 'slash', 'plus', 'bang']: |
14 | 7 apt.packages(packages=['syncthing']) |
8 | |
9 # now we have /lib/systemd/system/syncthing@.service | |
10 user = 'ari' if host.name == 'dot' else 'drewp' | |
11 systemd.service(service=f'syncthing@{user}', running=True, enabled=True) | |
12 | |
13 # also consider https://github.com/Martchus/syncthingtray tray status viewer on dtops | |
145 | 14 |
15 # also consider https://github.com/Martchus/syncthingtray tray status viewer on dtops |