mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
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.
32 lines
772 B
YAML
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
|