--- - name: "Discover test devices" hosts: localhost gather_facts: false vars: distro_key: "{{ lookup('ansible.builtin.env', 'MOLECULE_DISTRO') }}" scenario_vars: archlinux: hostname: "desktop.local" ubuntu-noble: hostname: "laptop.local" ubuntu-resolute: hostname: "laptop.local" raspberrypi: hostname: "rpi5.local" bootstrap_pi: true proxmox: hostname: "pve.local" bootstrap_proxmox: true tasks: - name: "Find loop device for vdd.img" become: true ansible.builtin.command: cmd: "losetup -j /opt/vdd.img" register: losetup_output changed_when: false - name: "Inject test vars into instance host" ansible.builtin.add_host: name: "instance" test_device: "{{ losetup_output.stdout.split(':')[0] }}" test_hostname: "{{ scenario_vars[distro_key].hostname }}" test_bootstrap_pi: "{{ scenario_vars[distro_key].bootstrap_pi | default(false) }}" test_bootstrap_proxmox: "{{ scenario_vars[distro_key].bootstrap_proxmox | default(false) }}" - name: Converge hosts: instance gather_facts: true vars: hostname: "{{ test_hostname }}" partition_wipe: false partition_disk: "{{ test_device }}" partition_boot: num: 1 name: "boot" flags: [boot, esp] part_start: "0%" part_end: "1.0GiB" fstype: "vfat" fstype_opts: "-F 32" dev: "{{ partition_disk }}p1" mount_path: "/mnt/boot/efi" fstab_opts: "defaults,nodev,nosuid,noexec,umask=0077" partition_swap: num: 2 name: "swap" flags: [swap] part_start: "1.0GiB" part_end: "2.0GiB" fstype: "ext4" dev: "{{ partition_disk }}p2" mount_path: "none" partition_root: num: 3 name: "root" part_start: "2.0GiB" part_end: "100%" fstype: "ext4" dev: "{{ partition_disk }}p3" mount_path: "/mnt" partition_extras: [] bootstrap_pi: "{{ test_bootstrap_pi }}" bootstrap_proxmox: "{{ test_bootstrap_proxmox }}" configure_playbook_dir: "../../../ansible-distro-configure" roles: - role: partition - role: bootstrap - role: configure