kolla-ansible/ansible/roles/grafana/tasks/config.yml
Mathias Ewald fe61591a7c Added grafana role
Added ansible role to deploy grafana

Added host group for grafana deployment

Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>

Change-Id: I3dec4e8586b6f65fa7de66a48506d1c79de2fe1e
Partially-Implements: Blueprint performance-monitoring
2016-09-14 09:36:34 +00:00

28 lines
731 B
YAML

---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
with_items:
- "grafana"
- name: Copying over config.json files
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items:
- "grafana"
- name: Copying over grafana.ini
merge_configs:
vars:
service_name: "{{ item }}"
sources:
- "{{ role_path }}/templates/grafana.ini.j2"
- "{{ node_custom_config }}/{{ item }}.ini"
- "{{ node_custom_config }}/grafana/{{ inventory_hostname }}/{{ item }}.ini"
dest: "{{ node_config_directory }}/grafana/grafana.ini"
with_items:
- "grafana"