ansible: Add rootnodes in new cluster
[lttng-ci.git] / automation / ansible / roles / libvirt / tasks / vm.yml
CommitLineData
455bd8ef
KS
1---
2- name: Merge defaults
3 set_fact:
4 vm: "{{vm_defaults|combine(object)}}"
5- name: Create VM disk
6 when: vm.disk
7 ansible.builtin.command:
8 argv: [
9 'qemu-img', 'create', '-f', 'qcow2',
10 "{{vm.disk}}", "{{vm.disk_capacity}}",
11 ]
12 creates: "{{vm.disk}}"
13- name: Define VM
14 # Note: is vm.uuid is not set and the template is changed, those changes will not be applied
15 # Note: many changes will require the VM to be destroyed then started again
16 community.libvirt.virt:
17 command: define
18 xml: "{{lookup('template', vm.template|default('vm_template.xml.j2'))}}"
19 autostart: true
This page took 0.023593 seconds and 4 git commands to generate.