File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
ansible/roles/alertmanager Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -50,3 +50,13 @@ alertmanager_config_default:
5050 receivers : " {{ alertmanager_receivers }}"
5151
5252alertmanager_config_extra : {} # top-level only
53+
54+ # Whether to set ProtectHome=true in systemd unit. This option may need to be
55+ # disabled in some environments, to avoid a "Failed to set up mount
56+ # namespacing" error when starting alertmanager.
57+ alertmanager_systemd_protect_home : true
58+
59+ # Whether to set ProtectSystem=strict in systemd unit. This option may need to
60+ # be disabled in some environments, to avoid a "Failed to set up mount
61+ # namespacing" error when starting alertmanager.
62+ alertmanager_systemd_protect_system : true
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ LockPersonality=true
3838NoNewPrivileges=true
3939MemoryDenyWriteExecute=true
4040PrivateTmp=true
41+ {% if alertmanager_systemd_protect_home | bool %}
4142ProtectHome=true
43+ {% endif %}
4244ReadWriteDirectories={{ alertmanager_storage_path }}
4345RemoveIPC=true
4446RestrictSUIDSGID=true
@@ -47,7 +49,9 @@ PrivateUsers=true
4749ProtectControlGroups=true
4850ProtectKernelModules=true
4951ProtectKernelTunables=yes
52+ {% if alertmanager_systemd_protect_system | bool %}
5053ProtectSystem=strict
54+ {% endif %}
5155
5256[Install]
5357WantedBy=multi-user.target
You can’t perform that action at this time.
0 commit comments