From a7502c5112b915934ea12bc8582c4a81243b2158 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Thu, 14 May 2020 17:33:38 +0200
Subject: [PATCH] Add new task to reboot gitlab runner hosts if required

---
 .gitlab-ci-template.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.gitlab-ci-template.yml b/.gitlab-ci-template.yml
index a9c4201..f53dc51 100644
--- a/.gitlab-ci-template.yml
+++ b/.gitlab-ci-template.yml
@@ -134,6 +134,16 @@ SanityReboot:
     variables:
       - $ANSIBLE_JOB_NAME && $ANSIBLE_JOB_NAME != "SanityReboot"
 
+SanityRebootGitLabRunner:
+  <<: *default_settings_cron
+  tags:
+    - ansible-reboot-runner
+  script:
+    - ascr sanity reboot --limit=gitlabrunner ${CHAT_INPUT} ${ANSIBLE_EXTRA_ARGS}
+  except:
+    variables:
+      - $ANSIBLE_JOB_NAME && $ANSIBLE_JOB_NAME != "SanityRebootGitLabRunner"
+
 JailkitUpgrade:
   <<: *default_settings_cron
   script:
-- 
GitLab