--- - 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 }}" 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