maxhoesel.proxmox.pve role – Performs basic setup tasks on a PVE node, such as repository and CPU configuration.

Note

This role is part of the maxhoesel.proxmox collection (version 5.1.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install maxhoesel.proxmox.

To use it in a playbook, specify: maxhoesel.proxmox.pve.

Entry point main – Performs basic setup tasks on a PVE node, such as repository and CPU configuration.

Synopsis

  • The following features are available and can be enabled/disabled individually: - Set a PVE repository (enterprise, no-subscription, test) (required) - Set the PVE root password (required) - Set the CPU governor to save power or improve performance - Support PCIe Passthrough by enabling the required modules

  • The PVE host must already be running and accessible via SSH

  • This role needs to be run with become: true

Parameters

Parameter

Comments

pve_cpu_governor

string

Which CPU governor to use for all CPU cores on each node

You can check which CPU governors are available for your CPU and driver by running cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors on one of your nodes.

The intel_pstate driver hands much of the CPU scaling off to the hardware and only supports two governors, powersave and performance. See the kernel docs for more information.

Older Intel CPUs under the intel_cpufreq driver and AMD CPUs can use any generic governor.

Proxmox defaults to performance due to potential BSODs in Windows guests when running with variable frequency.

ondemand and schedutil both scale CPU frequency dynamically and may improve power consumption.

Default: "performance"

pve_enable_pcie_passthrough

boolean

Whether to enable and configure PCIe passthrough on the host

If enabled, this will load the required kernel modules (and add intel_iommu=on to the kernel commandline on Intel CPUs)

Choices:

  • false ← (default)

  • true

pve_install_ucode

boolean

Whether to install the microcode packages for your appropriate CPU

This may not be required on fresh installs of PVE 8 and newer, as Debian 12 ships with this microcode by default

For Debian 11 and lower (PVE <= 7), this requires enabling the `non-free` repository

For Debian 12 and up (PVE >=8), the `non-free-firmware` repository will be enabled instead, if not already present

Choices:

  • false ← (default)

  • true

pve_pcie_reboot_for_kernel

boolean

Whether to automatically reboot the node to load the required kernel modules

If set to false, you may have to manually reboot the node to enable PCIe passthrough

This has no effect if pve_enable_pcie_passthrough is disabled

Choices:

  • false

  • true ← (default)

pve_reboot_for_ucode

boolean

Whether to reboot the host after microcode has been installed (if required)

If set to false, you may have to manually reboot the node to load the microcode

This has no effect if pve_install_ucode is disabled

Choices:

  • false

  • true ← (default)

pve_repo_type

string

Selects which PVE repository is enabled for pulling updates

Please note that this role does not configure your subscription key, you will have to do so yourself

Choices:

  • "enterprise"

  • "no-subscription" ← (default)

  • "test"

pve_root_password

string / required

Password for the root user

Must be a string of at least 8 characters

pve_set_cpu

boolean

Whether to modify the CPU configuration, such as the chosen governor.

Choices:

  • false ← (default)

  • true