prometheus: call update_motd role in play

This commit is contained in:
Alexandre Iooss 2021-11-27 19:20:32 +01:00
parent 1009298023
commit ce04f937db
2 changed files with 28 additions and 11 deletions

View file

@ -14,8 +14,12 @@
{{ groups['fleming_pve'] + groups['fleming_vm'] | list | sort }} {{ groups['fleming_pve'] + groups['fleming_vm'] | list | sort }}
prometheus_unifi_snmp_targets: prometheus_unifi_snmp_targets:
- targets: "{{ groups['fleming_unifi'] | list | sort }}" - targets: "{{ groups['fleming_unifi'] | list | sort }}"
update_motd:
prometheus: >-
Prometheus (en configuration fleming) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-pacaterie.adm.auro.re - hosts: prometheus-pacaterie.adm.auro.re
vars: vars:
@ -34,8 +38,12 @@
prometheus_ups_snmp_targets: prometheus_ups_snmp_targets:
- ups-pn-1.ups.auro.re - ups-pn-1.ups.auro.re
- ups-ps-1.ups.auro.re - ups-ps-1.ups.auro.re
update_motd:
prometheus: >-
Prometheus (en configuration pacaterie) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-edc.adm.auro.re - hosts: prometheus-edc.adm.auro.re
vars: vars:
@ -56,8 +64,12 @@
{{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }} {{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }}
prometheus_unifi_snmp_targets: prometheus_unifi_snmp_targets:
- targets: "{{ groups['edc_unifi'] | list | sort }}" - targets: "{{ groups['edc_unifi'] | list | sort }}"
update_motd:
prometheus: >-
Prometheus (en configuration edc) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-gs.adm.auro.re - hosts: prometheus-gs.adm.auro.re
vars: vars:
@ -77,8 +89,12 @@
- ups-gk-1.ups.auro.re - ups-gk-1.ups.auro.re
prometheus_pdu_snmp_targets: prometheus_pdu_snmp_targets:
- pdu-ga-1.ups.auro.re - pdu-ga-1.ups.auro.re
update_motd:
prometheus: >-
Prometheus (en configuration gs) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-rives.adm.auro.re - hosts: prometheus-rives.adm.auro.re
vars: vars:
@ -98,8 +114,12 @@
{{ groups['rives_pve'] + groups['rives_vm'] | list | sort }} {{ groups['rives_pve'] + groups['rives_vm'] | list | sort }}
prometheus_unifi_snmp_targets: prometheus_unifi_snmp_targets:
- targets: "{{ groups['rives_unifi'] | list | sort }}" - targets: "{{ groups['rives_unifi'] | list | sort }}"
update_motd:
prometheus: >-
Prometheus (en configuration rives) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-aurore.adm.auro.re - hosts: prometheus-aurore.adm.auro.re
vars: vars:
@ -132,8 +152,12 @@
- sw-ec-core.switch.auro.re - sw-ec-core.switch.auro.re
- sw-gk-core.switch.auro.re - sw-gk-core.switch.auro.re
- sw-r3-core.switch.auro.re - sw-r3-core.switch.auro.re
update_motd:
prometheus: >-
Prometheus (en configuration aurore) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-ovh.adm.auro.re - hosts: prometheus-ovh.adm.auro.re
vars: vars:
@ -152,9 +176,12 @@
- bdd-ovh.adm.auro.re - bdd-ovh.adm.auro.re
prometheus_docker_targets: prometheus_docker_targets:
- docker-ovh.adm.auro.re - docker-ovh.adm.auro.re
update_motd:
prometheus: >-
Prometheus (en configuration ovh) est déployé (/etc/prometheus).
roles: roles:
- prometheus - prometheus
- update_motd
- hosts: prometheus-federate.adm.auro.re - hosts: prometheus-federate.adm.auro.re
vars: vars:
@ -184,7 +211,6 @@
roles: roles:
- prometheus_postgres - prometheus_postgres
# Monitor all hosts # Monitor all hosts
- hosts: all,!edc_unifi,!fleming_unifi,!pacaterie_unifi,!gs_unifi,!rives_unifi,!aurore_testing_vm,!ovh_container - hosts: all,!edc_unifi,!fleming_unifi,!pacaterie_unifi,!gs_unifi,!rives_unifi,!aurore_testing_vm,!ovh_container
roles: roles:

View file

@ -118,13 +118,4 @@
name: prometheus name: prometheus
enabled: true enabled: true
state: started state: started
- name: Configure MOTD
include_role:
name: update_motd
vars:
motd_messages:
- key: 05-prometheus
message: >-
Prometheus est déployé sur cette machine (voir /etc/prometheus)
... ...