From 1d0200a1f050e6068cd1cdd55f9ab0bb366890f3 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Sat, 6 Mar 2021 04:32:06 +0100 Subject: [PATCH] Use 'update_motd' in 'prometheus' --- roles/prometheus/tasks/main.yml | 13 ++++++++----- .../templates/update-motd.d/05-service.j2 | 4 ---- 2 files changed, 8 insertions(+), 9 deletions(-) delete mode 100755 roles/prometheus/templates/update-motd.d/05-service.j2 diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index a820190..a3d2063 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -84,8 +84,11 @@ enabled: true state: started -- name: Indicate role in motd - template: - src: update-motd.d/05-service.j2 - dest: /etc/update-motd.d/05-prometheus - mode: 0755 +- include_role: + name: update_motd + vars: + motd_messages: + - key: 05-prometheus + message: >- + Prometheus est déployé sur cette machine (voir /etc/prometheus) +... diff --git a/roles/prometheus/templates/update-motd.d/05-service.j2 b/roles/prometheus/templates/update-motd.d/05-service.j2 deleted file mode 100755 index f027dc4..0000000 --- a/roles/prometheus/templates/update-motd.d/05-service.j2 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# {{ ansible_managed }} -echo "> prometheus a été déployé sur cette machine." -echo " Voir /etc/prometheus/"