
Changes name of ansible module kolla_docker to kolla_container. Change-Id: I13c676ed0378aa721a21a1300f6054658ad12bc7 Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
34 lines
999 B
YAML
34 lines
999 B
YAML
---
|
|
- name: Checking if Grafana container needs upgrading
|
|
vars:
|
|
service_name: "grafana"
|
|
service: "{{ grafana_services[service_name] }}"
|
|
become: true
|
|
kolla_container:
|
|
action: "compare_image"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ project_name }}"
|
|
image: "{{ grafana_image_full }}"
|
|
when: inventory_hostname in groups['grafana']
|
|
register: grafana_differs
|
|
|
|
- import_tasks: config.yml
|
|
|
|
- import_tasks: check-containers.yml
|
|
|
|
# NOTE(dszumski): We don't want old Grafana instances running after
|
|
# a new instance has updated the DB schema. Since the first instance
|
|
# is upgraded first, we stop all the other ones.
|
|
- name: Stopping all Grafana instances but the first node
|
|
become: true
|
|
kolla_container:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ project_name }}"
|
|
when:
|
|
- inventory_hostname != groups['grafana'] | first
|
|
- grafana_differs['result']
|
|
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|