# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2023, Intel Corporation

# This playbook is designed to update all installed packages at
# Rocky Linux / OpenSUSE and reboot the platform if required.
# The playbook description and how to use it are available
# in the README.md file.
#
# Note: This playbook is designed to work as a composite action during test preparation steps.
# Local usage will fail the playbook run.

- hosts: localhost
  connection: local

  become: true
  roles:
    - { role: update_suse, when: ansible_os_family == "Suse" }
    - { role: update_rocky, when: ansible_os_family == "RedHat" or ansible_os_family == "Rocky" }
  handlers:
    - include: handlers/reboot.yml
