mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 13:20:22 +00:00
fix: do not use namespace in node exporter systemd template
This commit is contained in:
parent
bec32d1d0c
commit
0d4c613bc7
1 changed files with 4 additions and 4 deletions
|
@ -50,14 +50,14 @@ Restart=always
|
|||
RestartSec=1
|
||||
StartLimitInterval=0
|
||||
|
||||
{% set ns = namespace(protect_home = 'yes') %}
|
||||
{% set protect_home = 'yes' %}
|
||||
{% for m in ansible_mounts if m.mount.startswith('/home') %}
|
||||
{% set ns.protect_home = 'read-only' %}
|
||||
{% set protect_home = 'read-only' %}
|
||||
{% endfor %}
|
||||
{% if node_exporter_textfile_dir.startswith('/home') %}
|
||||
{% set ns.protect_home = 'read-only' %}
|
||||
{% set protect_home = 'read-only' %}
|
||||
{% endif %}
|
||||
ProtectHome={{ ns.protect_home }}
|
||||
ProtectHome={{ protect_home }}
|
||||
NoNewPrivileges=yes
|
||||
|
||||
{% if (ansible_facts.packages.systemd | first).version is version('232', '>=') %}
|
||||
|
|
Loading…
Reference in a new issue