From 363556e6e2a4116e911ce8319b36df6d969af277 Mon Sep 17 00:00:00 2001 From: grizzly Date: Sat, 13 Apr 2019 12:03:03 +0200 Subject: [PATCH] Create the task and add the host for prometheus --- hosts | 1 + monitoring.yml | 6 ++++++ roles/prometheus/tasks/main.yml | 9 +++++++++ 3 files changed, 16 insertions(+) create mode 100644 monitoring.yml create mode 100644 roles/prometheus/tasks/main.yml diff --git a/hosts b/hosts index c5ed16c1..a6c9e676 100644 --- a/hosts +++ b/hosts @@ -10,6 +10,7 @@ [crans-container] [crans-vm] +prometheus.adm.crans.org [ovh-server] diff --git a/monitoring.yml b/monitoring.yml new file mode 100644 index 00000000..2801abe3 --- /dev/null +++ b/monitoring.yml @@ -0,0 +1,6 @@ +--- +# Playbook for monitoring + +- hosts: prometheus.adm.crans.org + roles: + - prometheus diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml new file mode 100644 index 00000000..bfaccdaf --- /dev/null +++ b/roles/prometheus/tasks/main.yml @@ -0,0 +1,9 @@ +--- + +- name: Instal Prometheus + apt: + update_cache: true + name: prometheus + register: apt_result + retries: 3 + until: apt_result is succeeded