Add ReadWritePaths (#34)

This commit is contained in:
Vitaly 2023-03-10 13:41:05 +08:00 committed by GitHub
parent 71e05aa022
commit f75c25fe6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -23,4 +23,4 @@
state: directory
owner: root
group: "{{ grafana_agent_user_group }}"
mode: 0755
mode: 0775

View File

@ -11,7 +11,7 @@ After=local-fs.target
Type=simple
User={{ grafana_agent_user }}
Group={{ grafana_agent_user_group }}
WorkingDirectory={{ grafana_agent_config_dir }}
WorkingDirectory={{ grafana_agent_data_dir }}
EnvironmentFile={{ grafana_agent_config_dir }}/{{ grafana_agent_env_file}}
ExecStart={{ grafana_agent_install_dir }}/{{ grafana_agent_binary }} \
@ -39,6 +39,7 @@ ProtectKernelTunables=yes
{% else %}
ProtectSystem=full
{% endif %}
ReadWritePaths=/tmp {{ grafana_agent_data_dir }} {{ grafana_agent_positions_dir }} {{ grafana_agent_wal_dir }}
[Install]
WantedBy=multi-user.target