blob: d74d4f38b3a7dc83a1bb17b0db7afea8adee8d3e [file] [log] [blame]
Zack Williams709f11b2016-03-17 14:29:51 -07001---
Zack Williamsef434f82016-04-07 17:15:39 -07002# roles/config-virt/tasks/main.yml
Zack Williams709f11b2016-03-17 14:29:51 -07003
4- name: Get ubuntu image for uvtool
5 command: uvt-simplestreams-libvirt sync --source http://cloud-images.ubuntu.com/daily \
6 release={{ ansible_distribution_release }} arch=amd64
7
8- name: Have libvirt enable port forwarding to VM's
9 become: yes
10 template:
11 src={{ item }}.j2
12 dest=/etc/libvirt/hooks/{{ item }}
13 mode=0755 owner=root
14 with_items:
15 - daemon
16 - qemu
17 notify:
18 - reload libvirt-bin
19 - run qemu hook
20
21- name: configure libvirt mgmtbr network DHCP range and IP assignments
22 virt_net:
23 command=define
24 name=default
25 xml='{{ lookup("template", "default.xml.j2") }}'
26 autostart=yes
27 state=active
28