summaryrefslogtreecommitdiff
path: root/manifests/syncthing.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-14 00:58:22 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-14 02:16:16 +0100
commitdffd09001ccdf3d4d23ca3f37ac9878e41450a3b (patch)
tree8798932a604507d9d7b7761c5666acb52994bcae /manifests/syncthing.pp
parentGandalf web certbot. (diff)
downloadprofiles-dffd09001ccdf3d4d23ca3f37ac9878e41450a3b.tar.gz
profiles-dffd09001ccdf3d4d23ca3f37ac9878e41450a3b.tar.xz
Migrate stuff from ansible.
Diffstat (limited to 'manifests/syncthing.pp')
-rw-r--r--manifests/syncthing.pp28
1 files changed, 28 insertions, 0 deletions
diff --git a/manifests/syncthing.pp b/manifests/syncthing.pp
new file mode 100644
index 0000000..7d8183e
--- /dev/null
+++ b/manifests/syncthing.pp
@@ -0,0 +1,28 @@
+class profiles::syncthing (
+ Array[String] $enable_for = []
+) {
+
+ # TODO add repo for those systems that need it
+
+ package { 'syncthing':
+ ensure => installed
+ }
+
+ systemd::dropin_file { 'nospam.conf':
+ unit => 'syncthing@.service',
+ content => @(EOF)
+ [Service]
+ ExecStart=
+ ExecStart=/bin/bash -c 'set -o pipefail; /usr/bin/syncthing -no-browser -no-restart -logflags=0 | grep -v "INFO: "'
+ | EOF
+ }
+
+ $enable_for.map |$user| {
+ service { "syncthing@${user}":
+ enable => true,
+ }
+ }
+
+ # TODO manage synced data
+
+}