
Qinling is an OpenStack project to provide "Function as a Service". This project aims to provide a platform to support serverless functions. Change-Id: I239a0130f8c8b061b531dab530d65172b0914d7c Implements: blueprint ansible-qinling-support Story: 2005760 Task: 33468
53 lines
2.4 KiB
YAML
53 lines
2.4 KiB
YAML
---
|
|
- name: Restart qinling-api container
|
|
vars:
|
|
service_name: "qinling-api"
|
|
service: "{{ qinling_services[service_name] }}"
|
|
config_json: "{{ qinling_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
qinling_conf: "{{ qinling_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_overwriting: "{{ qinling_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
qinling_api_container: "{{ check_qinling_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
environment: "{{ service.environment }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or qinling_conf.changed | bool
|
|
or policy_overwriting.changed | bool
|
|
or qinling_api_container.changed | bool
|
|
|
|
- name: Restart qinling-engine container
|
|
vars:
|
|
service_name: "qinling-engine"
|
|
service: "{{ qinling_services[service_name] }}"
|
|
config_json: "{{ qinling_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
qinling_conf: "{{ qinling_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_overwriting: "{{ qinling_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
qinling_engine_container: "{{ check_qinling_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
environment: "{{ service.environment }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or qinling_conf.changed | bool
|
|
or policy_overwriting.changed | bool
|
|
or qinling_engine_container.changed | bool
|