tasks: stop arch-svntogit.timer before rebooting

In a recent execution of the server upgrade task, svntogit was started
shortly before the reboot command was issued. Therefore, it was killed
two seconds into its run, leaving behind a lock file that prevented it
from starting again after gemini was rebooted.

Avoid the above timing issue by stopping the timer before rebooting.
This commit is contained in:
Evangelos Foutras 2022-01-09 19:28:07 +02:00
parent 201b1c243c
commit b6972fda76
No known key found for this signature in database
GPG key ID: 51E8B148A9999C34

View file

@ -39,11 +39,6 @@
- name: gemini pre-reboot checks
block:
- name: wait for svntogit to finish
wait_for:
path: /srv/svntogit/update-repos.sh.lock
state: absent
- name: list logged on users
command: who
register: who
@ -53,6 +48,14 @@
when:
- who is changed
- who.stdout_lines|length > 1
- name: stop arch-svntogit.timer
service: name=arch-svntogit.timer state=stopped
- name: wait for svntogit to finish
wait_for:
path: /srv/svntogit/update-repos.sh.lock
state: absent
when: inventory_hostname == "gemini.archlinux.org"
- name: reboot