Deploy LXC containers
ansible-playbook playbooks/deploy_lxc.yml --ask-become-pass
Note
--ask-become-pass is only required if you have additional configuration lines
and your ansible user is not in the proxmox sudoer file.
For additional information see Proxmox docs
This script creates the lxc container on the designated proxmox node
You first need to generate the lxc.yml host variables file with the
generate_hostvars.yml playbook. Then fill it according to your requirements.
Host variables
nodeRequired
your_node_name_here
vmidRequired
your_container_number_here
netif_configOptional
Default contained in
inventory/group_vars/all.yml
lxc_imageOptional
Default contained in
inventory/group_vars/all.ymlMust be available on your proxmox host
coreOptional
Default to 2
diskOptional
Default to “local-lvm:5”
memoryOptional
Default to 1024
swapOptional
Default to 1024
node_storage_for_lxcOptional
Default to “local-lvm”
featuresOptional
Omit by default
host_additional_conf_linesOptional
List
Omit by default
Can be used to add custom lines to the lxc .conf file
Serve as a workaround for proxmox token limitation. Only root@pam can use certain features (e.g.,
mount=nfs;cifs)