6647ed818a
Projects which may use Kafka include Monasca and Oslo messaging. Initially it will be possible to deploy a single Kafka cluster which may be shared among clients. Support for running multiple Kafka clusters may be added in a future change. This change also configures logging for Kafka server, state-change and controller logs. Partially-Implements: blueprint monasca-roles Change-Id: Iab8d200c2450238f3c0c708d1f4184490f6e6284
23 lines
924 B
YAML
23 lines
924 B
YAML
---
|
|
- name: Restart kafka container
|
|
vars:
|
|
service_name: "kafka"
|
|
service: "{{ kafka_services[service_name] }}"
|
|
config_json: "{{ kafka_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kafka_conf: "{{ kafka_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kafka_container: "{{ check_kafka_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
environment: "{{ service.environment }}"
|
|
volumes: "{{ service.volumes }}"
|
|
when:
|
|
- action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or kafka_conf.changed | bool
|
|
or kafka_container.changed | bool
|