Files
ansible-collection-infrastr…/roles/proxmox_lxc_provision/tasks/update.yml
T
patrick 51c1c5b611 refactor(proxmox_lxc_provision): rename password vars and parameterize user name
Rename lxc_password to lxc_root_password for consistency with the new
lxc_user_password (replaces the previously bare 'password' variable in
post-clone.yml, which silently collided with any same-named caller var).
Add lxc_user_name (default: admin) so the non-root account managed in
post-clone.yml is no longer hardcoded. Apply default(omit) to the root
password in create.yml so it is genuinely optional as documented.

BREAKING CHANGE: callers passing lxc_password or a bare 'password' var
must rename to lxc_root_password and lxc_user_password respectively.
2026-06-27 21:11:13 -04:00

22 lines
843 B
YAML
Executable File

---
- name: Update an LXC container
community.proxmox.proxmox:
vmid: "{{ lxc_vmid }}"
hostname: "{{ lxc_hostname }}"
password: "{{ lxc_root_password | default(omit) }}"
cores: "{{ lxc_cores }}"
memory: "{{ lxc_memory }}"
swap: "{{ lxc_swap }}"
disk: "{{ lxc_disk }}"
netif: '{"net0": "name=eth0,gw={{ lxc_gateway }},ip={{ lxc_ipv4 }},ip6={{ lxc_ipv6 | default(omit) }},bridge=vmbr0"}'
pubkey: "{{ lookup('file', lxc_pubkey_file) | default(omit) }}"
onboot: "{{ lxc_onboot | default(false) }}"
startup: "{{ lxc_startup | default(omit) }}"
features: "{{ lxc_features | default(omit) }}"
timezone: "{{ lxc_timezone | default(omit) }}"
nameserver: "{{ lxc_nameserver | default(omit) }}"
state: present
tags: "{{ lxc_tags | default(omit) }}"
update: true
register: lxc_result