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
This commit is contained in:
Emi Matchu 2024-01-14 06:08:00 -08:00
parent 6ca70721ec
commit e0ffcbdd7f

View file

@ -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!