Terraform + Ansible setup for various LXCs managed by Proxmox and based on Debian. Mountpoints on non-priviledged containers will require lxcid mappings to users with mountpoint access. I use a base container template with appropriate config; manually would work too. Sample & details in lxc.base.tf.bu
.
cd terraform
terraform init
terraform apply
# or if using clones and resource gets locked, limit parallelism:
terraform apply -parallelism=2
terraform apply -target=proxmox_lxc.RESOURCE_NAME
terraform destroy -target=proxmox_lxc.RESOURCE_NAME
terraform state rm 'proxmox_lxc.HOST_NAME'
cd ansible
ansible-playbook ./playbooks/NAME.playbook.yml
ansible-playbook ./site.yml
ssh-keygen -R "traefik.max.local" && \
ssh-keygen -R "plex.max.local"
# etc...
ansible -i production.yml -m ping HOST_NAME.max.local -u root -vvvv
# /usr/lib/tmpfiles.d/sshd.conf
d /run/sshd 0755 root root
- dash
- readarr
- nextcloud
- wireguard
- plexmetamanager
- vaultwarden
- vscode server
lxc-ls -f -Fname,pid
cd /proc/PID_OF_LXC/root