2017-01-23 11:40:29 -03:00
|
|
|
---
|
2020-07-23 10:26:27 +00:00
|
|
|
- name: Restart first grafana container
|
|
|
|
listen: Restart grafana container
|
2017-01-23 11:40:29 -03:00
|
|
|
vars:
|
|
|
|
service_name: "grafana"
|
|
|
|
service: "{{ grafana_services[service_name] }}"
|
2018-05-30 11:25:19 +07:00
|
|
|
become: true
|
2017-01-23 11:40:29 -03:00
|
|
|
kolla_docker:
|
|
|
|
action: "recreate_or_restart_container"
|
|
|
|
common_options: "{{ docker_common_options }}"
|
|
|
|
name: "{{ service.container_name }}"
|
|
|
|
image: "{{ service.image }}"
|
|
|
|
volumes: "{{ service.volumes }}"
|
2018-07-13 19:17:53 +05:30
|
|
|
dimensions: "{{ service.dimensions }}"
|
2017-01-23 11:40:29 -03:00
|
|
|
when:
|
2018-01-25 11:30:32 +08:00
|
|
|
- kolla_action != "config"
|
2020-07-23 10:26:27 +00:00
|
|
|
- inventory_hostname == groups[service.group]|first
|
|
|
|
|
|
|
|
- name: Waiting for grafana to start on first node
|
|
|
|
listen: Restart grafana container
|
|
|
|
vars:
|
|
|
|
service_name: "grafana"
|
|
|
|
service: "{{ grafana_services[service_name] }}"
|
|
|
|
become: true
|
|
|
|
kolla_toolbox:
|
|
|
|
module_name: uri
|
|
|
|
module_args:
|
|
|
|
url: "http://{{ api_interface_address | put_address_in_context('url') }}:{{ grafana_server_port }}/login"
|
|
|
|
status_code: 200
|
|
|
|
register: result
|
|
|
|
until: result.get('status') == 200
|
2021-12-03 19:28:29 +01:00
|
|
|
retries: "{{ grafana_start_first_node_retries }}"
|
|
|
|
delay: "{{ grafana_start_first_node_delay }}"
|
2020-07-23 10:26:27 +00:00
|
|
|
when:
|
2021-01-18 15:26:27 +00:00
|
|
|
- kolla_action != "config"
|
2020-07-23 10:26:27 +00:00
|
|
|
- inventory_hostname == groups[service.group]|first
|
|
|
|
|
|
|
|
- name: Restart remaining grafana containers
|
|
|
|
listen: Restart grafana container
|
|
|
|
vars:
|
|
|
|
service_name: "grafana"
|
|
|
|
service: "{{ grafana_services[service_name] }}"
|
|
|
|
become: true
|
|
|
|
kolla_docker:
|
|
|
|
action: "recreate_or_restart_container"
|
|
|
|
common_options: "{{ docker_common_options }}"
|
|
|
|
name: "{{ service.container_name }}"
|
|
|
|
image: "{{ service.image }}"
|
|
|
|
volumes: "{{ service.volumes }}"
|
|
|
|
dimensions: "{{ service.dimensions }}"
|
|
|
|
when:
|
|
|
|
- kolla_action != "config"
|
|
|
|
- inventory_hostname != groups[service.group]|first
|