blob: 123b86be169cfdf2d007a1dfd95827740fa4c865 [file] [log] [blame]
---
# roles/create-vms/tasks/main.yml
- name: create Virtual Machines with uvt-kvm
shell: uvt-kvm create {{ item.name }} --cpu={{ item.cpu }} --memory={{ item.memMB }} --disk={{ item.diskGB }}; \
uvt-kvm wait --insecure {{ item.name }}
creates=/var/lib/uvtool/libvirt/images/{{ item.name }}.qcow
with_items: head_vm_list
- name: discover VM IP addresses
shell: uvt-kvm ip {{ item.name }}
with_items: head_vm_list
register: vm_ip
- name: Create /etc/hosts with VM IP addresses
template:
src=hosts.j2
dest=/etc/hosts