Skip to content

Proxmox LXC Module v1

Compare
Choose a tag to compare
@piyoki piyoki released this 03 Oct 03:13
· 247 commits to master since this release
2b51d9d

Summary

Introduce a way to bake proxmox-lxc-template on the fly with Ansible -

Implementation

  • Proxmox LXC Module - #209
  • Inventory and Sample Playbooks - #210

Details

  • Add support for ubuntu-privileged-2204-standard-lxc-template
  • Add support for ubuntu-unprivileged-2204-standard-lxc-template
  • Add support for ubuntu-privileged-2204-docker-lxc-template
  • Add sample inventory list
  • Add sample group_vars that are associated with the default inventory list
  • Add relevant playbooks to automate the proxmox-lxc-template baking process

Prerequisites

Update group_vars

Inventory Structure
./inventory/
├── local.yml
├── main.yml
├── proxmox-lxc
│   ├── proxmox-ubuntu-privileged-docker-lxc
│   │   ├── group_vars
│   │   │   └── proxmox-ubuntu-privileged-docker-lxc.yml
│   │   └── main.yml
│   ├── proxmox-ubuntu-privileged-standard-lxc
│   │   ├── group_vars
│   │   │   └── proxmox-ubuntu-privileged-standard-lxc.yml
│   │   └── main.yml
│   └── proxmox-ubuntu-unprivileged-standard-lxc
│       ├── group_vars
│       │   └── proxmox-ubuntu-unprivileged-standard-lxc.yml
│       └── main.yml
└── proxmox.yml

Feel free to update group_vars for proxmox-ubuntu-*.yml to fit your need.

Relevant Playbooks Preview
./playbooks/proxmox/
├── bake-lxc
│   ├── privileged
│   │   ├── purge-lxc.yml
│   │   ├── ubuntu-2204-docker.yml
│   │   └── ubuntu-2204-standard.yml
│   └── unprivileged
│       ├── purge-lxc.yml
│       └── ubuntu-2204-standard.yml
├── start-proxmox-vm.yml
└── stop-proxmox-vm.yml

How to Run

Bake ubuntu-2204-privileged-standard-lxc-template
cd $HOME/cloud-estate/ansible-playbooks
ansible-playbook -e ansible_become_pass=<localhost password> -i inventory/proxmox-lxc/proxmox-ubuntu-privileged-standard-lxc/ playbooks/proxmox/bake-lxc/privileged/ubuntu-2204-standard.yml
Purge ubuntu-2204-privileged-standard-lxc-template
cd $HOME/cloud-estate/ansible-playbooks
ansible-playbook -e ansible_become_pass=<localhost password> -i inventory/proxmox-lxc/proxmox-ubuntu-privileged-standard-lxc/ playbooks/proxmox/bake-lxc/privileged/purge-lxc.yml

References