blob: d74d4f38b3a7dc83a1bb17b0db7afea8adee8d3e [file] [log] [blame]
---
# roles/config-virt/tasks/main.yml
- name: Get ubuntu image for uvtool
command: uvt-simplestreams-libvirt sync --source http://cloud-images.ubuntu.com/daily \
release={{ ansible_distribution_release }} arch=amd64
- name: Have libvirt enable port forwarding to VM's
become: yes
template:
src={{ item }}.j2
dest=/etc/libvirt/hooks/{{ item }}
mode=0755 owner=root
with_items:
- daemon
- qemu
notify:
- reload libvirt-bin
- run qemu hook
- name: configure libvirt mgmtbr network DHCP range and IP assignments
virt_net:
command=define
name=default
xml='{{ lookup("template", "default.xml.j2") }}'
autostart=yes
state=active