master #2

Open
polz wants to merge 32 commits from polz/servers:master into master
3 changed files with 15 additions and 1 deletions
Showing only changes of commit 05fe7eaf08 - Show all commits

View file

@ -1,3 +1,3 @@
Install and configure prometheus.
Job definitions should be placed in /etc/prometheus/conf.d by roles using this one.
Job definitions should be placed in /etc/prometheus/conf.d by roles using this one. Data retention time can be set with the `retention` property in a NetBox config context.

View file

@ -3,3 +3,9 @@
name: prometheus
state: reloaded
when: "'handler' not in ansible_skip_tags"
- name: restart prometheus
service:
name: prometheus
state: restarted
when: "'handler' not in ansible_skip_tags"

View file

@ -8,6 +8,14 @@
path: /etc/prometheus/conf.d
state: directory
- name: Configure prometheus retention time
when: retention is defined
lineinfile:
path: /etc/conf.d/prometheus
regexp: "^prometheus_retention_time="
line: "prometheus_retention_time={{ retention }}"
notify: restart prometheus
- name: Configure prometheus
copy:
dest: /etc/prometheus/