1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/playbooks/tasks/include/upgrade-server.yml
Evangelos Foutras 66224e0d08
tasks/upgrade-servers: host-specific post-upgrades
The Ansible output is too noisy with all the skipped tasks; avoid this
by moving host-speicific tasks into their own files that get included.
2022-09-20 15:03:10 +03:00

30 lines
753 B
YAML

- name: Ensure latest keyring
pacman:
name: archlinux-keyring
state: latest
update_cache: yes
- name: Upgrade all packages
pacman:
upgrade: yes
register: pacman_upgrade
- name: Stop if no packages were upgraded
meta: end_host
when: pacman_upgrade is not changed
- name: Run borg client post-upgrade tasks
include_tasks: include/post-upgrade/borg-clients.yml
when: "'borg_clients' in group_names"
- name: Check for host-specific post-upgrade tasks
local_action: stat path=include/post-upgrade/{{ inventory_hostname }}.yml
register: post_upgrade_tasks
- name: Run host-specific post-upgrade tasks
include_tasks: "{{ post_upgrade_tasks.stat.path }}"
when: post_upgrade_tasks.stat.exists
- name: Reboot
reboot: