From e0ffcbdd7f14376113f3685438836ffbe814b1dd Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sun, 14 Jan 2024 06:08:00 -0800 Subject: [PATCH] Oops, enable the Forgejo service! That's a step I've been forgetting with services lately, but yeah, I ran into this where analytics.openneo.net went down and I wasn't sure why it didn't get auto-restarted, and I think it being Started But Not Enabled is why. So, ta-da! Fix it here before we run into that lol. Also I refactored the handlers a bit, after seeing how I did it in the analytics Ansible file and going like. Oh, yeah, that's just better lol --- setup-forgejo.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup-forgejo.yml b/setup-forgejo.yml index 1495d47..30e1aab 100644 --- a/setup-forgejo.yml +++ b/setup-forgejo.yml @@ -59,16 +59,21 @@ src: files/forgejo.service dest: /etc/systemd/system/forgejo.service notify: + - Reload service files - Restart Forgejo - - name: Start Forgejo service + - name: Enable Forgejo service systemd_service: name: forgejo + enabled: true state: started handlers: + - name: Reload service files + systemd_service: + daemon_reload: true + - name: Restart Forgejo systemd_service: name: forgejo state: restarted - daemon_reload: true # For the case where the service file changes!