From ab7d81f822d3ad74fa010f51b8828c41bfd634cf Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 24 Jul 2018 12:43:44 -0700 Subject: [PATCH] Add convenience playbooks for restarting openQA worker services This is something I have to do every so often and it's an awful pain doing it by hand these days given how many boxes there are, so this seems smarter... Signed-off-by: Adam Williamson --- .../manual/openqa-restart-staging-workers.yml | 15 +++++++++++++++ playbooks/manual/openqa-restart-workers.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 playbooks/manual/openqa-restart-staging-workers.yml create mode 100644 playbooks/manual/openqa-restart-workers.yml diff --git a/playbooks/manual/openqa-restart-staging-workers.yml b/playbooks/manual/openqa-restart-staging-workers.yml new file mode 100644 index 0000000000..bf205cf6e0 --- /dev/null +++ b/playbooks/manual/openqa-restart-staging-workers.yml @@ -0,0 +1,15 @@ +- name: restart worker services on openQA worker hosts (production) + hosts: openqa-stg-workers + user: root + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + handlers: + - import_tasks: "{{ handlers_path }}/restart_services.yml" + + tasks: + - name: restart all the worker services + service: name=openqa-worker@{{ item }} state=restarted + with_sequence: "count={{ openqa_workers }}" + diff --git a/playbooks/manual/openqa-restart-workers.yml b/playbooks/manual/openqa-restart-workers.yml new file mode 100644 index 0000000000..047a37690e --- /dev/null +++ b/playbooks/manual/openqa-restart-workers.yml @@ -0,0 +1,15 @@ +- name: restart worker services on openQA worker hosts (production) + hosts: openqa-workers + user: root + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + handlers: + - import_tasks: "{{ handlers_path }}/restart_services.yml" + + tasks: + - name: restart all the worker services + service: name=openqa-worker@{{ item }} state=restarted + with_sequence: "count={{ openqa_workers }}" +