Files
ansible/playbooks/arch_upgrade.yml
2026-03-08 06:55:57 -04:00

27 lines
792 B
YAML

- name: All Arch hosts up-to-date
hosts: arch
tasks:
- name: Get current Python minor version
ansible.builtin.shell:
cmd: python --version | grep -Po '\d+\.\d+'
register: orig_python
- name: Full repository upgrade
become: true
community.general.pacman:
update_cache: true
upgrade: true
- name: Get new Python minor version
ansible.builtin.shell:
cmd: python --version | grep -Po '\d+\.\d+'
register: new_python
- name: AUR upgrade
aur:
use: pikaur
upgrade: true
aur_only: true
- import_tasks: ../tasks/aur_rebuild.yml
vars:
package_pattern: python
when:
- new_python.stdout is version(orig_python.stdout, '>', version_type='strict')