Add hypervisor playbook to Vagrant

This commit is contained in:
Kris Lamoureux 2020-07-01 00:45:47 -04:00
parent bad45b2fe9
commit 93ec159bbb
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
4 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# base
allow_reboot: false
manage_network: false
# libvirt
libvirt_users: vagrant
libvirt_isos:
- url: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso
hash: sha256:ab3763d553330e90869487a6843c88f1d4aa199333ff16b653e60e59ac1fc60b
- url: https://cdimage.debian.org/debian-cd/current/i386/iso-cd/debian-10.4.0-i386-netinst.iso
hash: sha256:549966a43224f237c46ee4397901ec9fd6feae74abb1e6f6baa0078acf77a936

9
dev/hypervisor.yml Normal file
View File

@ -0,0 +1,9 @@
- name: Install Hypervisor
hosts: all
become: true
vars_files:
- host_vars/hypervisor.yml
roles:
- ansible
- base
- libvirt

View File

@ -1,2 +1,3 @@
manage_network: false
network_type: static
allow_reboot: true

View File

@ -15,3 +15,13 @@
append: yes
with_items: "{{ libvirt_users }}"
when: libvirt_users is defined
- name: Download GNU/Linux ISOs
get_url:
url: "{{ item.url }}"
dest: /var/lib/libvirt/images
checksum: "{{ item.hash }}"
owner: libvirt-qemu
group: libvirt-qemu
loop: "{{ libvirt_isos }}"
when: libvirt_isos is defined