Skip to content
Snippets Groups Projects
Commit 8f41dfb9 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

prometheus: Switch to direct systemd command handling w/o conf.d

parent 79aacdd2
No related branches found
No related tags found
No related merge requests found
Pipeline #5106 failed
--- ---
- name: Reload systemd
systemd:
daemon_reload: true
- name: Restart prometheus - name: Restart prometheus
systemd: systemd:
name: prometheus.service name: prometheus.service
......
...@@ -29,11 +29,24 @@ ...@@ -29,11 +29,24 @@
- prometheus - prometheus
- config - config
- name: Create systemd unit override directory
file:
path: /etc/systemd/system/prometheus.service.d
state: directory
owner: root
group: root
mode: "0755"
when: ansible_distribution == "Gentoo"
tags:
- promtheus
- config
- name: Configure prometheus command arguments - name: Configure prometheus command arguments
template: template:
src: confd-prometheus.j2 src: override.conf.j2
dest: /etc/conf.d/prometheus dest: /etc/systemd/system/prometheus.service.d/override.conf
notify: notify:
- Reload systemd
- Restart prometheus - Restart prometheus
when: ansible_distribution == "Gentoo" when: ansible_distribution == "Gentoo"
tags: tags:
......
# arguments for Prometheus
command_args="{{ prometheus_args }}"
supervisor="supervise-daemon"
[Service]
ExecStart=
ExecStart=/usr/bin/prometheus {{ prometheus_args }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment