scottslowe-learning-tools/kvm-macvtap/provision.yml
Scott Lowe e6466553fb Commit initial build of KVM+macvtap environment
This is an initial set of files for working with KVM and macvtap
interfaces for KVM guests. The environment is not yet functional,
but this is a start. Changes need to be made to the Ansible
provisioning, and a way to enable promiscuous mode needs to be found.
2016-01-19 23:08:58 -07:00

32 lines
772 B
YAML

---
- hosts: "all"
sudo: "yes"
remote_user: "vagrant"
tasks:
- name: "Install KVM and Libvirt"
apt:
state: "present"
update_cache: "yes"
name: "{{ item }}"
with_items:
- qemu-kvm
- libvirt-bin
- virtinst
- name: Download Cirros image
get_url:
url: https://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
dest: /home/vagrant/cirros-0.3.2-x86_64-disk.img
validate_certs: no
- name: Set file permissions
file:
path: /home/vagrant/cirros-0.3.2-x86_64-disk.img
owner: vagrant
group: vagrant
mode: 0644
- name: Copy Libvirt network definition
copy:
src: macvtap.xml
dest: /home/vagrant/macvtap.xml
owner: vagrant
group: vagrant