Repository navigation
Common Playbook
Cloud Codger edited this page Oct 6, 2026
·
1 revision
This role will create two machines, a CT and a VM, each configured to use DHCP in one single play. It will demonstrate how to use the cloudcodger.proxmox_client.add_guest_host role for PVE clusters with a large number of guest machines, that would cause the inventory plugin with want_facts enabled, to take longer than acceptable.
- Create a CT and a VM.
- Have both use DHCP to obtain an IP address.
- Use
cloudcodger.proxmox_client.add_guest_hostto inject the new hosts into the inventory. - Configure the machines in the same playbook.
cloudcodger.assorted_apt.cloud_init_rebootcloudcodger.assorted_apt.initial_apt_updatecloudcodger.proxmox_client.add_guest_hostcloudcodger.proxmox_client.cloud_initcloudcodger.proxmox_client.lxc
- Showcase prerequisites.
-
Built cloud-init image w/
qemu-guest-agentpre-installed. - Acquired CT template.
Run the playbook.
ansible-playbook -i lab-minimal common.ymlThe common.yml playbook contains three plays.
Creates the guest machines defined in lab-minimal/host_vars/local_common.yml.
Perform the initial APT update and dist upgrade on the CT and perform a reboot if the update requires it.
Perform a reboot when required after the inital Cloud-Init will have done an upgrade that may require a reboot.