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:
parent
4986190a69
commit
5ff9037832
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue