From 42bf77ee5763090d2c02f5d2d7a7a686ce09a5e8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 21 Jul 2022 02:32:05 +0200 Subject: add role for sachet --- .../monitoring/sachet/templates/sachet.service.j2 | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 roles/monitoring/sachet/templates/sachet.service.j2 (limited to 'roles/monitoring/sachet/templates/sachet.service.j2') diff --git a/roles/monitoring/sachet/templates/sachet.service.j2 b/roles/monitoring/sachet/templates/sachet.service.j2 new file mode 100644 index 00000000..9f87c39d --- /dev/null +++ b/roles/monitoring/sachet/templates/sachet.service.j2 @@ -0,0 +1,35 @@ +[Unit] +Description=Sachet SMS Daemon for Prometheus Alertmanager + +[Service] +Restart=always +User=sachet +ExecStart=/usr/bin/sachet -config /etc/sachet.yml -listen-address {{ sachet_listen }} + +# systemd hardening-options +AmbientCapabilities= +CapabilityBoundingSet= +DeviceAllow=/dev/null rw +DevicePolicy=strict +LimitMEMLOCK=0 +LockPersonality=true +MemoryDenyWriteExecute=true +NoNewPrivileges=true +PrivateDevices=true +PrivateTmp=true +PrivateUsers=true +ProtectControlGroups=true +ProtectHome=true +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectSystem=full +{% if 'smstools' in sachet_providers %} +ReadWritePaths={{ sachet_providers.smstools.outgoing_dir }} +{% endif %} +RemoveIPC=true +RestrictNamespaces=true +RestrictRealtime=true +SystemCallArchitectures=native + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3