553a05c9d0
Change-Id: I88f84e21ec6ae6dd98f672112f34be8d53f2e2ad
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
---
|
|
- name: Ensuring kibana config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item.key }}"
|
|
state: "directory"
|
|
recurse: yes
|
|
when:
|
|
- inventory_hostname in groups[item.value.group]
|
|
- item.value.enabled | bool
|
|
with_dict: "{{ kibana_services }}"
|
|
|
|
- name: Copying over config.json files for services
|
|
template:
|
|
src: "{{ item.key }}.json.j2"
|
|
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
|
|
register: kibana_config_jsons
|
|
when:
|
|
- inventory_hostname in groups[item.value.group]
|
|
- item.value.enabled | bool
|
|
with_dict: "{{ kibana_services }}"
|
|
notify:
|
|
- Restart kibana container
|
|
|
|
- name: Copying over Kibana configuration file
|
|
template:
|
|
src: "{{ item.key }}.yml.j2"
|
|
dest: "{{ node_config_directory }}/{{ item.key }}/{{ item.key }}.yml"
|
|
register: kibana_confs
|
|
when:
|
|
- inventory_hostname in groups[item.value.group]
|
|
- item.value.enabled | bool
|
|
with_dict: "{{ kibana_services }}"
|
|
notify:
|
|
- Restart kibana container
|
|
|
|
- name: Check kibana containers
|
|
kolla_docker:
|
|
action: "compare_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ item.value.container_name }}"
|
|
image: "{{ item.value.image }}"
|
|
volumes: "{{ item.value.volumes }}"
|
|
register: check_kibana_containers
|
|
when:
|
|
- action != "config"
|
|
- inventory_hostname in groups[item.value.group]
|
|
- item.value.enabled | bool
|
|
with_dict: "{{ kibana_services }}"
|
|
notify:
|
|
- Restart kibana container
|