- ansible_facts['distribution'] == 'Ubuntu'
# the package lists are updated by "make lcitool-refresh"
- - name: Include package lists based on OS and architecture
- include_vars:
- file: "ubuntu-2404-{{ ansible_facts['architecture'] }}.yaml"
+ - 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:
- - ansible_facts['distribution'] == 'Ubuntu'
- - ansible_facts['distribution_version'] == '24.04'
+ - package_file is exists
+ - packages is defined