Open mweinelt opened 7 months ago
Currently our repository isn't setup to expose actual Ansible roles, that's something that we'll want to work on but will require a bunch more restructuring and fixes on our side.
Hopefully we can find someone who's more familiar with creating properly consumable Ansible roles who can help put that together while also not regressing the simple case of just deploy Incus/OVN/Ceph in one shot through this.
We can keep everything in the same repo and utilize roles without using ansible-galaxy
and having roles maintained in a separate repo. We can just create a roles
directory and just reference them. All ansible-galaxy
does is operate as a package manager of sorts to go fetch roles from other places and bring them into the roles directory for us. This would help keep things simple for now until there is a need for wanting to package the ansible role into a separate distributable role for others to consume and bring into their own custom playbooks.
Based on how each playbooks is broken out into multiple plays, I expect most of the hard work or organizing things is already done, and the roles could probably be defined similarly.
I could re-organize things into roles as a pull request, but I'm hesitant to re-arrange things until I'm able to test it myself, and I'm waiting on some new equipment to come in next week which I'm expecting will allow me to test all this.
Yeah, we definitely want to avoid causing regressions at this stage :)
I'll be traveling next week so won't be able to easily test pull requests coming in, so no rush, we can make some progress on this stuff once you can run it for yourself!
I am also willing to help with the refactoring. We can also provide some infrastructure to test.
I need to do some cleanup on my Github self-hosted test runners but once that's done I should be able to have this repo be able to grab some pretty sizable test runners (64GB of RAM and 8 vCPU or something like that) which would then allow for a normal Github Action workflow to run both the Terraform and Ansible parts of this.
I am interested in the refactor and can help contribute. I can also offer some decently sized VMs for running test runners.
I started working on the refactoring, see #7
I'm wondering what the intended way to make use of the playbooks is. Generally we would reference the git repository in our
requirements.yml
, but the current directory structure seems unsuitable for that.https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-multiple-roles-from-a-file
This is how I would expect to use it:
And this is how it currently fails.
For one, I think the ansible directory is not something that can be referenced from a
requirements.yml
, but also the role is missing ameta/main.yaml
, likely with agalaxy_info
dict.https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#using-meta-main-yml
WDYT?