From bb1b0857b3ac8c74d2389d7ce1af2b4cb3e78c1f Mon Sep 17 00:00:00 2001 From: Bertrand Lallau Date: Wed, 10 May 2017 17:33:32 +0200 Subject: [PATCH] Grafana post_config checks only need to run locally Recently added post_config for Grafana does some uri queries, these can be problematic if run across every node. Change-Id: I580212474879da18780fc5f66a21952a9e6f8daa --- ansible/roles/grafana/tasks/post_config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/grafana/tasks/post_config.yml b/ansible/roles/grafana/tasks/post_config.yml index a2742e7359..3833c1fdee 100644 --- a/ansible/roles/grafana/tasks/post_config.yml +++ b/ansible/roles/grafana/tasks/post_config.yml @@ -6,7 +6,7 @@ - name: Enable influxdb datasource uri: - url: "{{ internal_protocol }}://{{ api_interface_address }}:{{ grafana_server_port }}/api/datasources" + url: "{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ grafana_server_port }}/api/datasources" method: POST user: admin password: "{{ grafana_admin_password }}" @@ -15,6 +15,8 @@ force_basic_auth: yes status_code: 200, 409 register: response + run_once: True + connection: local when: grafana_data_source is defined changed_when: response.status == 200 failed_when: response.status not in [200, 409] or