From 03c48e23575796fb530154b6a44417a33895830f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Fri, 4 Nov 2016 16:51:17 +0000 Subject: [PATCH] Use apt_repository update_cache feature With ansible 2.2, apt_repository update_cache feature has been fixed. When a new repo will be added, apt-get update will be run after the addition if update_cache is set to yes. This combined with the apt module now properly checking the cache validity, we can now have proper updating of the cache with registering variables. Change-Id: Ic9788156a88223dc0d27fafa2a798f396135f990 --- cluster_metrics/playbook-grafana.yml | 1 + cluster_metrics/playbook-influx-db.yml | 1 + cluster_metrics/playbook-influx-telegraf.yml | 1 + cluster_metrics/playbook-kapacitor.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/cluster_metrics/playbook-grafana.yml b/cluster_metrics/playbook-grafana.yml index 78f1b99f..ba0203c8 100644 --- a/cluster_metrics/playbook-grafana.yml +++ b/cluster_metrics/playbook-grafana.yml @@ -53,6 +53,7 @@ apt_repository: repo: "deb https://packagecloud.io/grafana/stable/debian/ wheezy main" state: "present" + update_cache: yes - name: Install grafana apt: pkg: "grafana" diff --git a/cluster_metrics/playbook-influx-db.yml b/cluster_metrics/playbook-influx-db.yml index 306bef96..cbbdf6f5 100644 --- a/cluster_metrics/playbook-influx-db.yml +++ b/cluster_metrics/playbook-influx-db.yml @@ -34,6 +34,7 @@ apt_repository: repo: "deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable" state: "present" + update_cache: yes - name: Install influxdb apt: pkg: "influxdb" diff --git a/cluster_metrics/playbook-influx-telegraf.yml b/cluster_metrics/playbook-influx-telegraf.yml index 64016c04..44b32dcb 100644 --- a/cluster_metrics/playbook-influx-telegraf.yml +++ b/cluster_metrics/playbook-influx-telegraf.yml @@ -26,6 +26,7 @@ apt_repository: repo: "deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable" state: "present" + update_cache: yes - name: Install telegraf apt: pkg: "telegraf" diff --git a/cluster_metrics/playbook-kapacitor.yml b/cluster_metrics/playbook-kapacitor.yml index 7646ec17..c7944050 100644 --- a/cluster_metrics/playbook-kapacitor.yml +++ b/cluster_metrics/playbook-kapacitor.yml @@ -22,6 +22,7 @@ apt_repository: repo: "deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable" state: "present" + update_cache: yes - name: Install kapacitor apt: pkg: "kapacitor"