From 943f78351d938171f49f12146509ff35dfd81f9c Mon Sep 17 00:00:00 2001 From: Christina Harlow Date: Wed, 24 Apr 2019 10:41:19 -0400 Subject: [PATCH] adding airflow worker and flower handlers --- handlers/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index fd2e932..a5131af 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -58,3 +58,31 @@ - 'role::airflow' - 'role::airflow::config' - 'role::airflow::install' + +- name: 'Restart airflow-worker' + become: True + service: + name: "{{ item.name }}" + state: 'restarted' + with_items: "{{ airflow_services_states }}" + when: + - "item.name == 'airflow-worker'" + - "item.state == 'started'" + tags: + - 'role::airflow' + - 'role::airflow::config' + - 'role::airflow::install' + +- name: 'Restart airflow-flower' + become: True + service: + name: "{{ item.name }}" + state: 'restarted' + with_items: "{{ airflow_services_states }}" + when: + - "item.name == 'airflow-flower'" + - "item.state == 'started'" + tags: + - 'role::airflow' + - 'role::airflow::config' + - 'role::airflow::install'