From 69923813ddf2338c70cd1bae06301fb3f475171d Mon Sep 17 00:00:00 2001 From: Al Bowles Date: Mon, 27 Feb 2023 21:22:12 -0600 Subject: [PATCH] Correctly name workers.ini, move worker restart to handler --- handlers/main.yml | 9 +++++++++ tasks/openqa-worker.yml | 15 ++------------- .../openqa/{workers.conf.j2 => workers.ini.j2} | 0 3 files changed, 11 insertions(+), 13 deletions(-) rename templates/etc/openqa/{workers.conf.j2 => workers.ini.j2} (100%) diff --git a/handlers/main.yml b/handlers/main.yml index 4a3f3c4..839209c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -4,3 +4,12 @@ name: firewalld state: reloaded ignore_errors: "{{ ansible_check_mode }}" + +- name: Restart openQA workers + ansible.builtin.systemd: + name: "openqa-worker@{{ item }}" + state: restarted + enabled: true + # range "end" parameter is exclusive, so add 1 + loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}" + ignore_errors: "{{ ansible_check_mode }}" diff --git a/tasks/openqa-worker.yml b/tasks/openqa-worker.yml index ac682e1..2b4202e 100644 --- a/tasks/openqa-worker.yml +++ b/tasks/openqa-worker.yml @@ -41,21 +41,10 @@ mode: "0444" loop: - client.conf - - workers.conf + - workers.ini tags: - configure - -- name: Start openQA workers - ansible.builtin.systemd: - name: "openqa-worker@{{ item }}" - state: started - enabled: true - # range "end" parameter is exclusive, so add 1 - loop: "{{ range(1, (openqa_worker_count | int + 1)) | list }}" - tags: - - start_workers - - configure - ignore_errors: "{{ ansible_check_mode }}" + notify: Restart openQA workers - name: Start openQA cache services ansible.builtin.systemd: diff --git a/templates/etc/openqa/workers.conf.j2 b/templates/etc/openqa/workers.ini.j2 similarity index 100% rename from templates/etc/openqa/workers.conf.j2 rename to templates/etc/openqa/workers.ini.j2