Move templates of the prometheus role
This commit is contained in:
parent
5bcc428895
commit
bc35cd8e90
5 changed files with 10 additions and 13 deletions
|
@ -11,20 +11,16 @@
|
||||||
|
|
||||||
- name: Configure Prometheus
|
- name: Configure Prometheus
|
||||||
template:
|
template:
|
||||||
src: prometheus/prometheus.yml.j2
|
src: prometheus.yml.j2
|
||||||
dest: /etc/prometheus/prometheus.yml
|
dest: /etc/prometheus/prometheus.yml
|
||||||
mode: 0644
|
owner: prometheus
|
||||||
notify: Restart Prometheus
|
group: prometheus
|
||||||
|
mode: u=r,g=r,o=
|
||||||
- name: Configure Prometheus alert rules
|
|
||||||
template:
|
|
||||||
src: "prometheus/{{ item }}.j2"
|
|
||||||
dest: "/etc/prometheus/{{ item }}"
|
|
||||||
mode: 0644
|
|
||||||
notify: Restart Prometheus
|
|
||||||
loop:
|
loop:
|
||||||
|
- prometheus.yml
|
||||||
- alert.rules.yml
|
- alert.rules.yml
|
||||||
- django.rules.yml
|
- django.rules.yml
|
||||||
|
notify: Restart Prometheus
|
||||||
|
|
||||||
- name: Make Prometheus snmp-exporter listen on localhost only
|
- name: Make Prometheus snmp-exporter listen on localhost only
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -36,10 +32,11 @@
|
||||||
# This file store SNMP OIDs
|
# This file store SNMP OIDs
|
||||||
- name: Configure Prometheus snmp-exporter
|
- name: Configure Prometheus snmp-exporter
|
||||||
template:
|
template:
|
||||||
src: "prometheus/snmp.yml.j2"
|
src: snmp.yml.j2
|
||||||
dest: "/etc/prometheus/snmp.yml"
|
dest: /etc/prometheus/snmp.yml
|
||||||
mode: 0600
|
|
||||||
owner: prometheus
|
owner: prometheus
|
||||||
|
group: prometheus
|
||||||
|
mode: u=r,g=r,o=
|
||||||
notify: Restart prometheus-snmp-exporter
|
notify: Restart prometheus-snmp-exporter
|
||||||
|
|
||||||
# We don't need to restart Prometheus when updating nodes
|
# We don't need to restart Prometheus when updating nodes
|
||||||
|
|
Loading…
Reference in a new issue