Commit b1558bd8 authored by Tobias Winchen's avatar Tobias Winchen
Browse files

Move launch of side ars to launch_tasks

parent e04075b9
......@@ -40,3 +40,66 @@
async: 300
poll: 0
register: async_results_tmp
- name: Using Dashboard
block:
- name: "{{ image_name }}:: Setup dashboard"
uri:
url: "http://{{ grafana_host }}:{{ grafana_port }}/api/dashboards/db"
method: POST
headers:
Content-Type: "application/json;charset=UTF-8"
Accept: "application/json"
body: "{{ lookup('template','{{ dashboard_template }}') }}"
body_format: json
ignore_errors: yes
async: 300
poll: 0
register: async_results_tmp
tags:
- dashboard
- name: "{{ image_name }}:: Delete dashboard for "
uri:
url: "http://{{ grafana_host }}:{{ grafana_port }}/api/dashboards/uid/{{ container_name }}"
method: DELETE
tags:
- never
- stop
ignore_errors: yes
async: 300
poll: 0
register: async_results_tmp
- set_fact:
edd_container: '{{ edd_container | dict2items | rejectattr( "key", "equalto", container_name )|list|items2dict }}'
cacheable: true
when: dashboard_panels is defined or dashboard_template is defined
- name: "{{ image_name }}:: Launch influx sidecar"
include_role:
name: influx_sidecar
vars:
pipeline_id: "{{ container_name }}"
katcp_host: "{{ inventory_hostname }}"
katcp_port: "{{ bind_port }}"
exclude_sensors: "{% if influx_exclude_sensors is defined and influx_exclude_sensors%} {{ influx_exclude_sensors }} {% endif %}"
tags:
- always
when: dashboard_panels is defined or dashboard_template is defined or launch_influx_sidecar is defined and launch_influx_sidecar
- name: "{{ image_name }}:: Launch redis sidecar"
include_role:
name: redis_sidecar
vars:
pipeline_id: "{{ container_name }}"
katcp_host: "{{ inventory_hostname }}"
katcp_port: "{{ bind_port }}"
tags:
- always
when: launch_redis_sidecar is defined and launch_redis_sidecar
......@@ -59,69 +59,6 @@
- stop
- name: Using Dashboard
block:
- name: "{{ image_name }}:: Setup dashboard"
uri:
url: "http://{{ grafana_host }}:{{ grafana_port }}/api/dashboards/db"
method: POST
headers:
Content-Type: "application/json;charset=UTF-8"
Accept: "application/json"
body: "{{ lookup('template','{{ dashboard_template }}') }}"
body_format: json
ignore_errors: yes
async: 300
poll: 0
register: async_results_tmp
tags:
- dashboard
- name: "{{ image_name }}:: Delete dashboard for "
uri:
url: "http://{{ grafana_host }}:{{ grafana_port }}/api/dashboards/uid/{{ container_name }}"
method: DELETE
tags:
- never
- stop
ignore_errors: yes
async: 300
poll: 0
register: async_results_tmp
- set_fact:
edd_container: '{{ edd_container | dict2items | rejectattr( "key", "equalto", container_name )|list|items2dict }}'
cacheable: true
when: dashboard_panels is defined or dashboard_template is defined
- name: "{{ image_name }}:: Launch influx sidecar"
include_role:
name: influx_sidecar
vars:
pipeline_id: "{{ container_name }}"
katcp_host: "{{ inventory_hostname }}"
katcp_port: "{{ bind_port }}"
exclude_sensors: "{% if influx_exclude_sensors is defined and influx_exclude_sensors%} {{ influx_exclude_sensors }} {% endif %}"
tags:
- always
when: dashboard_panels is defined or dashboard_template is defined or launch_influx_sidecar is defined and launch_influx_sidecar
- set_fact:
async_list: "{{ async_list + [ async_results_tmp.ansible_job_id ] }}"
- name: "{{ image_name }}:: Launch redis sidecar"
include_role:
name: redis_sidecar
vars:
pipeline_id: "{{ container_name }}"
katcp_host: "{{ inventory_hostname }}"
katcp_port: "{{ bind_port }}"
tags:
- always
when: launch_redis_sidecar is defined and launch_redis_sidecar
- set_fact:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment