From ce04f937db9ca8b2ea567e6ec597ba65b204ec30 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 27 Nov 2021 19:20:32 +0100 Subject: [PATCH] prometheus: call update_motd role in play --- monitoring.yml | 30 ++++++++++++++++++++++++++++-- roles/prometheus/tasks/main.yml | 9 --------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/monitoring.yml b/monitoring.yml index f5b2ef8..9be7fb6 100755 --- a/monitoring.yml +++ b/monitoring.yml @@ -14,8 +14,12 @@ {{ groups['fleming_pve'] + groups['fleming_vm'] | list | sort }} prometheus_unifi_snmp_targets: - targets: "{{ groups['fleming_unifi'] | list | sort }}" + update_motd: + prometheus: >- + Prometheus (en configuration fleming) est déployé (/etc/prometheus). roles: - prometheus + - update_motd - hosts: prometheus-pacaterie.adm.auro.re vars: @@ -34,8 +38,12 @@ prometheus_ups_snmp_targets: - ups-pn-1.ups.auro.re - ups-ps-1.ups.auro.re + update_motd: + prometheus: >- + Prometheus (en configuration pacaterie) est déployé (/etc/prometheus). roles: - prometheus + - update_motd - hosts: prometheus-edc.adm.auro.re vars: @@ -56,8 +64,12 @@ {{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }} prometheus_unifi_snmp_targets: - targets: "{{ groups['edc_unifi'] | list | sort }}" + update_motd: + prometheus: >- + Prometheus (en configuration edc) est déployé (/etc/prometheus). roles: - prometheus + - update_motd - hosts: prometheus-gs.adm.auro.re vars: @@ -77,8 +89,12 @@ - ups-gk-1.ups.auro.re prometheus_pdu_snmp_targets: - pdu-ga-1.ups.auro.re + update_motd: + prometheus: >- + Prometheus (en configuration gs) est déployé (/etc/prometheus). roles: - prometheus + - update_motd - hosts: prometheus-rives.adm.auro.re vars: @@ -98,8 +114,12 @@ {{ groups['rives_pve'] + groups['rives_vm'] | list | sort }} prometheus_unifi_snmp_targets: - targets: "{{ groups['rives_unifi'] | list | sort }}" + update_motd: + prometheus: >- + Prometheus (en configuration rives) est déployé (/etc/prometheus). roles: - prometheus + - update_motd - hosts: prometheus-aurore.adm.auro.re vars: @@ -132,8 +152,12 @@ - sw-ec-core.switch.auro.re - sw-gk-core.switch.auro.re - sw-r3-core.switch.auro.re + update_motd: + prometheus: >- + Prometheus (en configuration aurore) est déployé (/etc/prometheus). roles: - prometheus + - update_motd - hosts: prometheus-ovh.adm.auro.re vars: @@ -152,9 +176,12 @@ - bdd-ovh.adm.auro.re prometheus_docker_targets: - docker-ovh.adm.auro.re + update_motd: + prometheus: >- + Prometheus (en configuration ovh) est déployé (/etc/prometheus). roles: - prometheus - + - update_motd - hosts: prometheus-federate.adm.auro.re vars: @@ -184,7 +211,6 @@ roles: - prometheus_postgres - # Monitor all hosts - hosts: all,!edc_unifi,!fleming_unifi,!pacaterie_unifi,!gs_unifi,!rives_unifi,!aurore_testing_vm,!ovh_container roles: diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index f9e48e8..e7dd24d 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -118,13 +118,4 @@ name: prometheus enabled: true 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) ...