--- - name: "Download LXC template" community.proxmox.proxmox_template: api_host: "{{ ansible_facts['hostname'] }}" api_user: "{{ pve_admin_user }}@pve" api_password: "{{ pve_admin_password }}" validate_certs: false node: "{{ ansible_facts['hostname'] }}" storage: "local" content_type: "vztmpl" template: "{{ pve_lxc_template }}" state: present tags: # PVE API not available in containers — requires proxmox-ve package - "molecule-notest" - name: "Provision LXC container" community.proxmox.proxmox: api_host: "{{ ansible_facts['hostname'] }}" api_user: "{{ pve_admin_user }}@pve" api_password: "{{ pve_admin_password }}" validate_certs: false node: "{{ ansible_facts['hostname'] }}" vmid: "{{ pve_lxc_id }}" hostname: "{{ pve_lxc_hostname }}" ostemplate: "local:vztmpl/{{ pve_lxc_template }}" disk: "{{ pve_lxc_disk }}" cores: "{{ pve_lxc_cores }}" memory: "{{ pve_lxc_memory }}" pubkey: "{{ user_public_keys | join('\n') }}" netif: net0: "name=eth0,ip={{ pve_lxc_ip }},gw={{ pve_lxc_gateway }},bridge=vmbr0" nameserver: "{{ pve_lxc_dns }}" onboot: true unprivileged: true cmode: "shell" state: present tags: # PVE API not available in containers — requires proxmox-ve package - "molecule-notest" - name: "Start LXC container" community.proxmox.proxmox: api_host: "{{ ansible_facts['hostname'] }}" api_user: "{{ pve_admin_user }}@pve" api_password: "{{ pve_admin_password }}" validate_certs: false node: "{{ ansible_facts['hostname'] }}" vmid: "{{ pve_lxc_id }}" state: started tags: # PVE API not available in containers — requires proxmox-ve package - "molecule-notest"