forked from vyos/vyos-vm-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qemu.yml
49 lines (49 loc) · 1.43 KB
/
qemu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
- hosts: qemu
gather_facts: false
connection: local
vars:
vyos_platform: QEMU
vyos_format: qcow2
vyos_qemu_img: "/tmp/vyos-{{ vyos_version }}{{ ci_tag | default() }}-{{vyos_disk_size}}G-qemu.qcow2"
vyos_output_img: "{{ vyos_qemu_img }}"
cloud_init: "false"
cloud_init_ds_string: "{{ cloud_init_ds | default('NoCloud,ConfigDrive,None') }}"
cloud_init_ds_list: "{{ cloud_init_ds_string.split(',') }}"
tasks:
- block:
- include_role:
name: '{{ roleinputvar }}'
loop:
- install-packages
- load-modules
- download-iso
- mount-iso
- get-version
- create-disk
- setup-root-partition
- install-image
- mount-root-fs
- install-config
- install-grub
- install-persistence-conf
- install-cloud-init-wrapper
- install-guest-agent-wrapper
- install-custom-packages-wrapper
- fstrim
- unmount-pre
- create-pxe-archive
- unmount-all
- qemu-qcow2
- cleanup-ending
- release
loop_control:
loop_var: roleinputvar
rescue:
- include_role:
name: '{{ roleinputvar }}'
loop:
- unmount-pre
- unmount-all
loop_control:
loop_var: roleinputvar