File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 44 when : " libvirt_vms | rejectattr('state', 'eq', 'absent')"
55
66- include_tasks : volumes.yml
7+ vars :
8+ libvirt_vm_volumes : " {{ vm.volumes | default([]) }}"
79 with_items : " {{ libvirt_vms }}"
810 loop_control :
911 loop_var : vm
1012 when : (vm.state | default('present')) == 'present'
1113
1214- include_tasks : vm.yml
15+ vars :
16+ libvirt_vm_console_log_path : " {{ vm.console_log_path | default(libvirt_vm_default_console_log_dir + '/' + vm.name + 'console.log') }}"
17+ libvirt_vm_name : " {{ vm.name }}"
18+ machine_default : " {{ none if libvirt_vm_engine == 'kvm' else 'pc-1.0' }}"
19+ libvirt_vm_machine : " {{ vm.machine | default(machine_default) }}"
20+ cpu_mode_default : " {{ 'host-passthrough' if libvirt_vm_engine == 'kvm' else 'host-model' }}"
21+ libvirt_vm_cpu_mode : " {{ vm.cpu_mode | default(cpu_mode_default) }}"
22+ libvirt_vm_volumes : " {{ vm.volumes | default([]) }}"
23+ libvirt_vm_interfaces : " {{ vm.interfaces | default([]) }}"
1324 with_items : " {{ libvirt_vms }}"
1425 loop_control :
1526 loop_var : vm
1627 when : (vm.state | default('present')) == 'present'
1728
1829- include_tasks : destroy-volumes.yml
30+ vars :
31+ libvirt_vm_volumes : " {{ vm.volumes | default([]) }}"
1932 with_items : " {{ libvirt_vms }}"
2033 loop_control :
2134 loop_var : vm
2235 when : (vm.state | default('present')) == 'absent'
2336
2437- include_tasks : destroy-vm.yml
38+ vars :
39+ libvirt_vm_name : " {{ vm.name }}"
2540 with_items : " {{ libvirt_vms }}"
2641 loop_control :
2742 loop_var : vm
You can’t perform that action at this time.
0 commit comments