From c96633d45494d0b6f2f9dd8dcbb7f6c1f0e494ca Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 11 Jan 2018 14:54:32 +0100 Subject: [PATCH] Make custom kibana configuration files possible Change-Id: Iedfad564f834504fa1f4bfd935cd735d1d9ee65f --- ansible/roles/kibana/tasks/config.yml | 17 +++++++++++------ .../kibana-custom-config-74afd6ddee462ed8.yaml | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/kibana-custom-config-74afd6ddee462ed8.yaml diff --git a/ansible/roles/kibana/tasks/config.yml b/ansible/roles/kibana/tasks/config.yml index ae23521e10..6ef0ebdd92 100644 --- a/ansible/roles/kibana/tasks/config.yml +++ b/ansible/roles/kibana/tasks/config.yml @@ -26,17 +26,22 @@ notify: - Restart kibana container -- name: Copying over Kibana configuration file +- name: Copying over kibana configuration file + vars: + kibana: "{{ kibana_services.kibana }}" template: - src: "{{ item.key }}.yml.j2" - dest: "{{ node_config_directory }}/{{ item.key }}/{{ item.key }}.yml" + src: "kibana.yml.j2" + dest: "{{ node_config_directory }}/kibana/kibana.yml" mode: "0660" become: true register: kibana_confs + with_first_found: + - "{{ node_custom_config }}/kibana/{{ inventory_hostname }}/kibana.yml" + - "{{ node_custom_config }}/kibana/kibana.yml" + - "kibana.yml.j2" when: - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ kibana_services }}" + - inventory_hostname in groups[kibana.group] + - kibana.enabled | bool notify: - Restart kibana container diff --git a/releasenotes/notes/kibana-custom-config-74afd6ddee462ed8.yaml b/releasenotes/notes/kibana-custom-config-74afd6ddee462ed8.yaml new file mode 100644 index 0000000000..327df3b8fe --- /dev/null +++ b/releasenotes/notes/kibana-custom-config-74afd6ddee462ed8.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds ability to provide a custom kibana config.