In Part 5, I completely refactored the project to follow Ansible best practices. I split the monolithic role into distinct, focused roles and packaged everything into an Ansible collection. This reorganization makes the workflow more modular, maintainable, and easier to share on Ansible Galaxy.
Posts for: #Ansible
Ansible Playbooks for Proxmox and LXCs Part 4
In Part 4, I integrated Docker into the Proxmox/LXC workflow. I used Jeff Geerling’s Docker role to automate Docker installation, set up Docker Compose, and created container templates using Jinja2. This part covers adding a dedicated play for Docker and demonstrates how to automatically launch Docker containers on provisioned LXCs.
Ansible Playbooks for Proxmox and LXCs Part 3
Part 3 finally gets our containers talking to Ansible. We dynamically add our new LXCs to the inventory and use SSH to configure them automatically—setting up passwordless sudo for our non-root user, installing extra utilities, and tweaking the login experience.
Ansible Playbooks for Proxmox and LXCs Part 2
Part 2 digs into the real-world challenges of managing Proxmox container states—waiting for containers to finally be ready, handling states like ‘started’ and ‘stopped’, and upgrading our modules so SSH key injection works. A practical look at the trials (and occasional headaches) of automating Proxmox with Ansible.
Ansible Playbooks for Proxmox and LXCs Part 1
Part one of the series covers setting up Ansible, creating a role with some tasks, and writing an LXC management playbook.