From 8ec36dd6852c79fcc2aeed46b4265e00ebd2bb9c Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 21 Jul 2022 19:27:34 +0000 Subject: [PATCH] Notify apache2 reload on updates to mirror vhost Reflect changes to mirror vhost configs immediately in their running Apache services by notifying a new reload handler. Change-Id: Ib3c9560781116f94b0fdfc56dfa5df3a1af74113 --- playbooks/roles/mirror/handlers/main.yaml | 7 ++++++- playbooks/roles/mirror/tasks/main.yaml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/mirror/handlers/main.yaml b/playbooks/roles/mirror/handlers/main.yaml index 6edd3d3105..245ffc665e 100644 --- a/playbooks/roles/mirror/handlers/main.yaml +++ b/playbooks/roles/mirror/handlers/main.yaml @@ -1,4 +1,9 @@ - name: restart apache2 service: name: apache2 - state: restarted \ No newline at end of file + state: restarted + +- name: reload apache2 + service: + name: apache2 + state: reloaded diff --git a/playbooks/roles/mirror/tasks/main.yaml b/playbooks/roles/mirror/tasks/main.yaml index 46e83ae75e..87ba8b1c03 100644 --- a/playbooks/roles/mirror/tasks/main.yaml +++ b/playbooks/roles/mirror/tasks/main.yaml @@ -141,6 +141,8 @@ template: src: mirror.vhost.j2 dest: /etc/apache2/sites-available/mirror.conf + notify: + - reload apache2 - name: Make sure default site disabled command: a2dissite 000-default.conf