Add pve_lxc, which manages the lifecycle of a Proxmox VE LXC container through the Proxmox API (community.proxmox), reconciles the raw lxc.* lines of its config on the node and, opt-in, writes its guest firewall file. It keeps the pve_lxc_* interface and carries no legacy-name guard. The input asserts run from tasks/validate.yml before any change, and the API token secret has no default. The molecule scenario runs the validation and the node-side task files against a container standing in for the node; the API lifecycle is not exercised. Debian trixie is declared, untested. Refs #386 Assisted-by: Claude Code:claude-opus-5-5
12 lines
900 B
YAML
12 lines
900 B
YAML
---
|
|
# The onboot flag sent to Proxmox on create and update. Derived from the desired state, not an
|
|
# input: a container meant to be stopped must not start when its node reboots, so stopped forces
|
|
# false even when pve_lxc_onboot is true. absent never reaches the create or update task.
|
|
__pve_lxc_effective_onboot: "{{ (pve_lxc_onboot | bool) and pve_lxc_state != 'stopped' }}"
|
|
# Authorization header of the ansible.builtin.uri calls, derived from the pve_lxc_api_* inputs.
|
|
__pve_lxc_api_auth_header: "PVEAPIToken={{ pve_lxc_api_user }}@{{ pve_lxc_api_realm }}!{{ pve_lxc_api_token_id }}={{ pve_lxc_api_token_secret }}"
|
|
# Raw config line patterns, read by validate.yml and raw_config.yml.
|
|
__pve_lxc_raw_config_prefix_pattern: '^lxc\.[^\n]*$'
|
|
__pve_lxc_raw_config_legacy_marker_pattern: '^# (BEGIN|END) ANSIBLE MANAGED BLOCK \(lxc_raw_config\)$'
|
|
__pve_lxc_raw_config_section_header_pattern: '^\[.*\]$'
|