Initial commit

This commit is contained in:
2023-12-08 19:01:12 -05:00
commit d0dad3fbc4
7 changed files with 230 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
kvm_provision Role
=========
Deployes libvirt virtual machines from various template sources.
Requirements
------------
Community libvirt:
```
ansible-galaxy collection install community.libvirt
```
Example Playbook
----------------
```
- name: Deploys VM based on template image
hosts: localhost
gather_facts: yes
become: yes
vars:
pool_dir: "/var/lib/libvirt/images"
vm: debian_12
vcpus: 2
ram_mb: 2048
cleanup: no
vm_user: beegyoshi
vm_pass: stinky
net: bridged-network
tasks:
- name: KVM Provision role
include_role:
name: kvm_provision
vars:
libvirt_pool_dir: "{{ pool_dir }}"
vm_name: "{{ vm }}"
vm_vcpus: "{{ vcpus }}"
vm_ram_mb: "{{ ram_mb }}"
vm_net: "{{ net }}"
cleanup_tmp: "{{ cleanup }}"
```
Author Information
------------------
leander@one-button.org