Skip to content

Common Playbook

Cloud Codger edited this page Oct 6, 2026 · 1 revision

The common.yml Playbook

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.

Objective:

Showcased roles

  • cloudcodger.assorted_apt.cloud_init_reboot
  • cloudcodger.assorted_apt.initial_apt_update
  • cloudcodger.proxmox_client.add_guest_host
  • cloudcodger.proxmox_client.cloud_init
  • cloudcodger.proxmox_client.lxc

Prerequisites

Commands

Run the playbook.

ansible-playbook -i lab-minimal common.yml

Playbook

The common.yml playbook contains three plays.

Create CT and VM play

Creates the guest machines defined in lab-minimal/host_vars/local_common.yml.

CT APT Update and Reboot

Perform the initial APT update and dist upgrade on the CT and perform a reboot if the update requires it.

VM Reboot

Perform a reboot when required after the inital Cloud-Init will have done an upgrade that may require a reboot.

Clone this wiki locally