kolla-ansible/ansible/roles/kibana/tasks/config.yml
zhubingbing 553a05c9d0 Fix 'kibana_config_jsons' is undefined
Change-Id: I88f84e21ec6ae6dd98f672112f34be8d53f2e2ad
2017-02-10 10:08:58 +00:00

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