deploy-base/roles/fedora-upgrade/tasks/tasks.yml

25 lines
645 B
YAML
Raw Permalink Normal View History

---
- name: install dnf-plugin-system-upgrade
dnf:
name: dnf-plugin-system-upgrade
state: present
- name: stage upgraded packages for fedora {{ fedora_target }}
shell: "dnf -y system-upgrade download --releasever={{ fedora_target }}"
args:
warn: false
register: dnf_result
changed_when: "'Download complete' in dnf_result.stdout"
- name: trigger upgrade
shell: nohup bash -c 'sleep 2 && dnf system-upgrade reboot' &
register: upgraded_reset
when: (dnf_result is changed)
- name: wait for hosts to upgrade, reboot, and return
wait_for_connection:
timeout: 900
delay: 20
when: upgraded_reset is changed