chzerv.libvirt

Ansible Role: Libvirt

Test and release. License: MIT Ansible Role

This role installs and configures libvirt on Debian-based, RedHat-based and Archlinux systems.

Requirements

None.

Role Variables

libvirt_selinux_booleans

SELinux booleans to be applied. Make sure to read RedHat's documentation on securing VMs.

libvirt_install_virt_manager: true

Whether to install virt-manager or not. Virt-manager is a GUI front-end for libvirt, so it is most likely useless in headless systems.

libvirt_uefi_vm_support: true

Install OVMF packages which provide the ability to create VMs using UEFI boot mode.

libvirt_access_vms_using_hostnames: true

Enable the libvirt NSS module which allows host access to guests on non-isolated networks.

libvirt_users_in_libvirt_group: []

A list of users that will be added to the libvirt group. Users of this group are allowed password-less access to the libvirt daemon.

Dependencies

None.

Example Playbook

- hosts: server
  vars_files:
    - vars/main.yml

  roles:
    - { role: chzerv.libvirt }

The vars/main.yml file:

libvirt_install_virt_manager: true
libvirt_uefi_vm_support: true
libvirt_access_vms_using_hostnames: true
libvirt_users_in_libvirt_group:
  - bob

License

MIT / BSD

Author Information

Xristos Zervakis

About

Install and configure libvirt on a Linux box.

Install
ansible-galaxy install chzerv.libvirt
GitHub repository
License
mit
Downloads
153
Owner
Linux nerd who loves self-hosting and automating every little thing. I break infrastructure for fun and fix it for learning.