389ds-server icon indicating copy to clipboard operation
389ds-server copied to clipboard

Lets get the roles into a collction :)

Open McAndersDK opened this issue 7 months ago • 4 comments

Hey LVPS,

could we not package the roles into a collection? Jeff geerling, have a good example: https://github.com/geerlingguy/ansible-collection-k8s this way we can still have standalone roles, but also make them into a collection that can be depended from another, and be automatisk installed.

What do you say? :)

McAndersDK avatar May 01 '26 07:05 McAndersDK

@lvps if you create a new repo, I can look into create the code for it :)

McAndersDK avatar May 26 '26 11:05 McAndersDK

Honestly, I'm not sure if this would be that useful: there are just 2 roles and they don't actually depend on each other. I'm not even sure if many people are using both at the same time.

lvps avatar May 26 '26 19:05 lvps

@lvps It's not so much that they depend on each other, it's that I want them installed automatically as part of collection dependencies.

I really need the collection approach for a better user experience rather than having users manage role dependencies manually.

A collection can't depend on standalone roles directly, but it can depend on another collection. So wrapping the shared functionality into a small supporting collection would solve the dependency/install problem cleanly.

The problem is that it would need to exist in the lvps namespace, which I can't do myself. Otherwise I'd have to fork everything and create my own namespace for both the collection and the two roles.

McAndersDK avatar May 28 '26 07:05 McAndersDK

I'm not entirely convinced that the Ansible developers have been making the right technical choices in the last few years, but oh well, I created a repository: https://github.com/lvps/ansible-collection-389ds You can send me a pull request there

lvps avatar May 28 '26 22:05 lvps