---
- name: YUM upgrade all packages  # noqa package-latest
  yum:
    name: '*'
    state: latest
  register: yum_upgrade

- name: Reboot after YUM upgrade  # noqa no-handler
  when:
  - yum_upgrade.changed or system_upgrade_reboot == 'always'
  - system_upgrade_reboot != 'never'
  reboot:
