diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 20:13:55 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-12-29 20:13:55 +0100 |
commit | d04542e000b8f8fadce45af96d93fb904ca99115 (patch) | |
tree | e85ee2bb0472d9f83f051f31d2629bf4c96bb755 /modules/profiles/manifests/syncthing.pp | |
parent | Setup new site.pp. (diff) | |
parent | Migrate stuff from ansible. (diff) | |
download | webdav_server-d04542e000b8f8fadce45af96d93fb904ca99115.tar.gz webdav_server-d04542e000b8f8fadce45af96d93fb904ca99115.tar.xz |
Merge branch 'master' of /home/hugo/puppet into production
Diffstat (limited to 'modules/profiles/manifests/syncthing.pp')
-rw-r--r-- | modules/profiles/manifests/syncthing.pp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/profiles/manifests/syncthing.pp b/modules/profiles/manifests/syncthing.pp new file mode 100644 index 0000000..7d8183e --- /dev/null +++ b/modules/profiles/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 + +} |