Files
infrastructure/playbooks/tasks/upgrade-servers.yml
Christian Heusel 99a76908e7 upgrade_servers: Drop usage of equinix server group
In an earlier commit we had droped the group along with the hosts in it
as the sponsorship was discontinued by the vendor.

Fixes: 42284ec2 ("Remove equinix metal machines")
Link: https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/664
Link: https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/663
Signed-off-by: Christian Heusel <christian@heusel.eu>
2025-11-10 18:53:04 +01:00

54 lines
1.5 KiB
YAML

- name: Pre-upgrade tasks
hosts: all
tasks:
- name: Apply IgnorePkg to pacman.conf
ansible.builtin.lineinfile:
path: /etc/pacman.conf
regexp: 'IgnorePkg\s*='
line: "IgnorePkg = {{ ignore_package_upgrades | join(' ') }}"
when: ignore_package_upgrades | default([], true) | length > 0
- name: Comment IgnorePkg in pacman.conf if no value set
ansible.builtin.lineinfile:
path: /etc/pacman.conf
regexp: 'IgnorePkg\s*='
line: "#IgnorePkg ="
when: ignore_package_upgrades | default([], true) | length == 0
- name: Upgrade, reboot and health-check accounts.archlinux.org
hosts: accounts.archlinux.org
max_fail_percentage: 0
gather_facts: false
tasks:
- name: Upgrade and reboot
include_tasks: include/upgrade-server.yml
- name: Wait for Keycloak to become available
uri: url=https://{{ inventory_hostname }}/
register: result
until: result.status == 200
# retry for 5 minutes after boot
retries: 30
delay: 10
- name: Upgrade and reboot all hetzner servers
hosts: all,!accounts.archlinux.org,!kape_servers,!misaka
max_fail_percentage: 0
serial: 20%
gather_facts: false
tasks:
- name: Upgrade each host in this batch
include_tasks: include/upgrade-server.yml
- name: Upgrade and reboot all sponsored external servers
hosts: kape_servers,misaka
max_fail_percentage: 0
serial: 1
gather_facts: false
tasks:
- name: Upgrade each host in this batch
include_tasks: include/upgrade-server.yml