There is no practical difference between the systems when it comes to updating the installed system. Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-ID: <20251027110344.2289945-5-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
# Copyright (c) 2021 Red Hat, Inc.
|
|
#
|
|
# Author:
|
|
# Cleber Rosa <crosa@redhat.com>
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or
|
|
# later. See the COPYING file in the top-level directory.
|
|
#
|
|
# This is an ansible playbook file. Run it to set up systems with the
|
|
# environment needed to build QEMU.
|
|
---
|
|
- name: Installation of basic packages to build QEMU
|
|
hosts: all
|
|
tasks:
|
|
- name: Check for suitable ansible version
|
|
delegate_to: localhost
|
|
assert:
|
|
that:
|
|
- '((ansible_version.major == 2) and (ansible_version.minor >= 8)) or (ansible_version.major >= 3)'
|
|
msg: "Unsuitable ansible version, please use version 2.8.0 or later"
|
|
|
|
- name: Update apt cache / upgrade packages via apt
|
|
apt:
|
|
update_cache: yes
|
|
upgrade: yes
|
|
when:
|
|
- ansible_facts['distribution'] in ['Ubuntu', 'Debian']
|
|
|
|
# the package lists are updated by "make lcitool-refresh"
|
|
- name: Define package list file path
|
|
set_fact:
|
|
package_file: "ubuntu/ubuntu-2404-{{ ansible_facts['architecture'] }}.yaml"
|
|
when:
|
|
- ansible_facts['distribution'] == 'Ubuntu'
|
|
- ansible_facts['distribution_version'] == '24.04'
|
|
|
|
- name: Include package lists based on OS and architecture
|
|
include_vars:
|
|
file: "{{ package_file }}"
|
|
when:
|
|
- package_file is exists
|
|
|
|
- name: Install packages for QEMU on Ubuntu 24.04
|
|
package:
|
|
name: "{{ packages }}"
|
|
when:
|
|
- package_file is exists
|
|
- packages is defined
|
|
|
|
|