An Ansible role to provision and configure a host server.
The role defines two tasks, namely
kvm.yml
: configure a Kernel Virtual Machine (libvirt) host serverlxd.yml
: configure a Linux Containers host server
I'd suggest running it aginst a newly installed system whose network/user
account settings can be configured in vars/main.yml
.
The playbook creates a bridged interface and reconfigures the pysical one before providing virtualization support.
Tested under CentOS 7 and AlmaLinux 9.
community.general
Ansible collection (for nmcli
):
ansible-galaxy collection install community.general
---
- hosts: host-server
tasks:
- import_role:
name: ansible-role-host-server
tasks_from: kvm.yml
Automating the host server configuration was useful during the development of these Terraform projects: