Change from cloud init to ignition

This commit is contained in:
2026-06-10 19:26:28 +02:00
parent f2c6da73df
commit 71c67cb81a
4 changed files with 23 additions and 8 deletions
+4 -4
View File
@@ -5,7 +5,7 @@ This project provides an Ansible-based framework to automatically provision virt
## 🚀 Features
- **Automated Host Setup**: Installs and configures `libvirt`, `qemu-kvm`, and `libguestfs-tools`.
- **Cloud-init Support**: Generates and injects Cloud-init user-data for all supported OSs via a NoCloud ISO.
- **Ignition Support**: Generates and injects Ignition configuration for all supported OSs via the `fw_cfg` QEMU feature.
- **Custom User Provisioning**: Automatically creates a default user with a hashed password and injects your SSH public key.
- **Modular Design**: Uses Ansible roles for host preparation, configuration generation, and VM provisioning.
@@ -20,7 +20,7 @@ ansible-kvm-vms/
│ └── vms.yml # List of VMs to create with CPU, RAM, and Disk specs
├── roles/
│ ├── kvm_host_setup/ # Installs virtualization dependencies on the host
│ ├── os_config/ # Generates Ignition/Cloud-init config files
│ ├── os_config/ # Generates Ignition configuration files
│ └── vm_provision/ # Downloads images and creates VMs via virt-install
└── playbooks/
└── create_vms.yml # Main orchestration playbook
@@ -65,8 +65,8 @@ Edit `vars/vms.yml` to add or modify the VMs you wish to deploy. You can specify
## 🔍 How it Works
Since immutable OSs do not use traditional installers, this setup uses a "seed" approach:
1. **Config Generation**: The `os_config` role creates a YAML Cloud-init user-data file based on your variables.
2. **Deployment**: `virt-install` is used to create the VM with UEFI boot. The `--cloud-init` flag is used to attach the configuration as a NoCloud ISO, which the immutable OSs (CoreOS, Flatcar, MicroOS) process at first boot.
1. **Config Generation**: The `os_config` role creates a JSON Ignition configuration file based on your variables.
2. **Deployment**: `virt-install` is used to create the VM with UEFI boot. The `--sysinfo` flag is used to provide the Ignition config via the `fw_cfg` device, which the immutable OSs (CoreOS, Flatcar, MicroOS) process at first boot.
## 🌐 Accessing your VMs