From 35824c1ad49ac362b5f30675bb7dc0d74c9918f9 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 2 Mar 2016 08:07:31 -0800 Subject: [PATCH] openqa-consumer: restart service on git changes ...otherwise you end up scheduling jobs with stale code and they fail, NOT THAT THAT'S EVER HAPPENED TO ME --- roles/openqa/dispatcher/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 136de23bc2..ae30a52373 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -121,3 +121,7 @@ - name: Enable and start consumer service: name=openqa-consumer.service enabled=yes state=started when: "openqa_consumer is defined and openqa_consumer" + +- name: Restart consumer if code changed + service: name=openqa-consumer.service state=restarted + when: "gittools|changed"