From 05da165d6ac1da52a78a34eeed19a8040cfad31f Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sat, 23 Mar 2019 22:36:10 -0400 Subject: [PATCH] Also include gear group with zuul start/stop playbooks Change-Id: I870e6b47bf606a232b5dd65f87bd66dbefb84e9b Signed-off-by: Paul Belanger --- playbooks/zuul/start.yaml | 8 ++++++++ playbooks/zuul/stop.yaml | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/playbooks/zuul/start.yaml b/playbooks/zuul/start.yaml index 5897dfb..6fea810 100644 --- a/playbooks/zuul/start.yaml +++ b/playbooks/zuul/start.yaml @@ -12,6 +12,14 @@ # License for the specific language governing permissions and limitations # under the License. --- +- hosts: gear:!disabled + tasks: + - name: starting gear + become: true + systemd: + name: gear + state: started + - hosts: zuul-scheduler:!disabled tasks: - name: starting zuul-scheduler diff --git a/playbooks/zuul/stop.yaml b/playbooks/zuul/stop.yaml index 78af3ff..1c563fb 100644 --- a/playbooks/zuul/stop.yaml +++ b/playbooks/zuul/stop.yaml @@ -86,3 +86,18 @@ path: "/proc/{{ result.status.MainPID }}/status" state: absent timeout: 11400 + +- hosts: gear:!disabled + tasks: + - name: stopping gear + become: true + systemd: + name: gear + state: stopped + register: result + + - name: Wait for (3h10m) to stop gear + wait_for: + path: "/proc/{{ result.status.MainPID }}/status" + state: absent + timeout: 11400