Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 1 | --- |
| 2 | # roles/config-virt/main/tasks.yml |
| 3 | |
| 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 | |