Support for LXC containers and VMs? #156
Replies: 6 comments
-
I think that would be something appropriate for a separate role, rather than including it in this role, since I believe guest creation should be decoupled from cluster creation. I wouldn't mind creating a new role (which you could then contribute to) and maintaining the codebase for it. Are there specific features you're eyeing that require using |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick response. Honestly, while I totally understand the feeling that cluster and guest creation should be decoupled in terms of Ansible roles, I don't really feel that it's worth it. Cluster creation is meant to be followed by guest creation, so using the same role for both stages provides consistency, simplicity and conciseness advantages. That said, looking closer at the official Ansible modules list, roles are indeed broken down into fine-grained modules. That supports your design of keeping those roles separate. To answer your last question, there aren't any particular features that I am aware of missing from |
Beta Was this translation helpful? Give feedback.
-
I get the feeling different engineers will have different opinions about this: my line of thought being that guest creation would be tied to some specific application, and thus would fall into a playbook specifically for that (not to mention that in many cases, they wouldn't be created by the admin of a cluster). I'm not that strongly opposed to having support for doing so in this role, but it would increase maintenance burden, and before doing so I'd prefer that it's providing something of decent value to users of this role. I'll leave this open for anyone else who might have a say on this. Although, if you do want to implement this for your own benefit, feel free to do so. I'd be open to any questions you might have while implementing it, too (either on discord (see readme) or Freenode IRC (lae)). |
Beta Was this translation helpful? Give feedback.
-
No worries at all. Let's go with your suggestion and create a new role for it. Let me know when it's available for PRs. I was wondering how you'd prefer to approach sharing connection/configuration settings (SSH keys, ACLs, users, groups, shared storage) between these two roles. Ideally, we would reference cluster configuration metadata for guest creation. |
Beta Was this translation helpful? Give feedback.
-
I've a role to deploy a new KVM (debian based with preseed Template). Currently it's not public because it depends on some issues in my inventory (for example pre configuration of SSH pubkeys for the KVM so it can be directly used with Ansible after creation). I'll publish that into a repository on my account. Because I don't use LXC. That part will is not supported by my role. |
Beta Was this translation helpful? Give feedback.
-
Hi @lae!
First off, congrats on
ansible-role-proxmox
. I have been educating myself recently on Ansible Proxmox options, and your repository is the most up-to-date and relevant.Looking at your implementation, your use of
pvesh
is the most natural and powerful. The three official Ansible modules (proxmox
,proxmox_kvm
andproxmox_template
) all rely onproxmoxer
, which is a simple wrapper over the Proxmox VE API with support for different access modes. Sincepvesh
is itself just an interface over the API, that seems like the right technical choice for an Ansible role.pvesh
/Proxmox API can be used for both LXC and VM creation. I feel that you repository is ripe for tackling support for them. What's your opinion on the topic?If this is something that you are open to, I could potentially contribute to that effort. Let me know!
Beta Was this translation helpful? Give feedback.
All reactions