From d1740f919b27d91272f0cfd61563cb5f1fbe91ee Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Thu, 20 Jul 2023 19:03:45 +0530 Subject: [PATCH] add hourly restarts as ansible --- cron/hourly-restarts.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 cron/hourly-restarts.yaml diff --git a/cron/hourly-restarts.yaml b/cron/hourly-restarts.yaml new file mode 100644 index 0000000..44d9fc3 --- /dev/null +++ b/cron/hourly-restarts.yaml @@ -0,0 +1,38 @@ +--- +- name: Hourly Restarts (ALL NODES) + hosts: docker,privfrontends + vars: + services: + - invidious-invidious-1 + tasks: + - name: Do thing + ansible.builtin.command: docker restart {{item}} + register: out + changed_when: out.rc != 0 + with_items: services +- name: Hourly Restarts (SOLEIL+REST) + hosts: docker,us,in + vars: + services: + - breezewiki + - anonymousoverflow-anonymousoverflow-1 + - simplytranslate + - scribe + tasks: + - name: Do thing + ansible.builtin.command: docker restart {{item}} + register: out + changed_when: out.rc != 0 + with_items: services +- name: Hourly Restarts (PIZZA+REST) + hosts: privfrontends + vars: + services: + - libreddit-libreddit-1 + - teddit + tasks: + - name: Do thing + ansible.builtin.command: docker restart {{item}} + register: out + changed_when: out.rc != 0 + with_items: services