1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-06 09:56:02 +02:00

Do not reboot gemini if there are logged on users

This is done to avoid killing db-update and related processes.
This commit is contained in:
Evangelos Foutras 2021-08-22 23:03:15 +03:00
parent 4986190a69
commit 5ff9037832
No known key found for this signature in database
GPG Key ID: 51E8B148A9999C34

View File

@ -24,10 +24,22 @@
when: pgrep is succeeded
when: "'buildservers' in group_names"
- name: wait for svntogit to finish
wait_for:
path: /srv/svntogit/update-repos.sh.lock
state: absent
- 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
- name: abort reboot with logged on users
meta: end_host
when:
- who is changed
- who.stdout_lines|length > 1
when: inventory_hostname == "gemini.archlinux.org"
- name: reboot