2023-05-31 05:46:55 +00:00
|
|
|
{{ ansible_managed | comment }}
|
|
|
|
[Unit]
|
|
|
|
Description=Smokeping Prober
|
|
|
|
After=network-online.target
|
|
|
|
StartLimitInterval=0
|
|
|
|
StartLimitIntervalSec=0
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
User={{ smokeping_prober_system_user }}
|
|
|
|
Group={{ smokeping_prober_system_group }}
|
|
|
|
PermissionsStartOnly=true
|
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
|
|
ExecStart={{ smokeping_prober_binary_install_dir }}/smokeping_prober \
|
|
|
|
--config.file={{ smokeping_prober_config_dir }}//{{ smokeping_prober_config_file }} \
|
2023-09-04 10:02:08 +00:00
|
|
|
{% if smokeping_prober_version is version('0.7.0', '>=') and
|
|
|
|
smokeping_prober_web_listen_address is iterable and
|
|
|
|
smokeping_prober_web_listen_address is not mapping and
|
|
|
|
smokeping_prober_web_listen_address is not string %}
|
|
|
|
{% for address in smokeping_prober_web_listen_address %}
|
|
|
|
--web.listen-address={{ address }}{{ " \\" if not loop.last else "" }}
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
2023-05-31 05:46:55 +00:00
|
|
|
--web.listen-address={{ smokeping_prober_web_listen_address }}
|
2023-09-04 10:02:08 +00:00
|
|
|
{% endif %}
|
2023-05-31 05:46:55 +00:00
|
|
|
|
|
|
|
SyslogIdentifier=smokeping_prober
|
|
|
|
KillMode=process
|
|
|
|
Restart=always
|
|
|
|
RestartSec=5
|
|
|
|
|
|
|
|
LockPersonality=true
|
|
|
|
NoNewPrivileges=true
|
|
|
|
MemoryDenyWriteExecute=true
|
|
|
|
PrivateTmp=true
|
|
|
|
ProtectHome=true
|
|
|
|
RemoveIPC=true
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
|
|
|
|
AmbientCapabilities=CAP_NET_RAW
|
|
|
|
{% if (ansible_facts.packages.systemd | first).version is version('232', '>=') %}
|
|
|
|
ProtectControlGroups=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
ProtectSystem=strict
|
|
|
|
{% else %}
|
|
|
|
ProtectSystem=full
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|