kolla-ansible/ansible/roles/skydive/tasks/config.yml
Mathieu Rohon 43900bc8b6 Add skydive service
This patch introduces the ansible materials to deploy
the skydive service, that can be used to monitor and
troubleshoot networking in an openstack deployment.

Implements: blueprint skydive-service

Co-Authored-By: Nicolas Bouron <nicolas.bouron@gmail.com>
Signed-off-by: Mathieu Rohon <mathieu.rohon@gmail.com>

Change-Id: I53051a1b0c85380416288e17040a398b6efb62c0
2017-06-06 09:09:10 +02:00

54 lines
1.6 KiB
YAML

---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item.key }}/config"
state: "directory"
recurse: yes
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ skydive_services }}"
- name: Copying over default config.json files
template:
src: "{{ item.key }}.json.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/config.json"
register: skydive_config_jsons
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ skydive_services }}"
notify:
- Restart skydive-analyzer container
- Restart skydive-agent container
- name: Copying over skydive config file
template:
src: "{{ item.key }}.conf.j2"
dest: "{{ node_config_directory }}/{{ item.key }}/skydive.conf"
register: skydive_confs
when:
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
with_dict: "{{ skydive_services }}"
notify:
- Restart skydive-analyzer container
- Restart skydive-agent container
- name: Check skydive 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_skydive_containers
when:
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ skydive_services }}"
notify:
- Restart skydive-analyzer container
- Restart skydive-agent container