ansible-modules-hashivault
ansible-modules-hashivault copied to clipboard
Install with ansible collections
Hello,
Will these modules be an ansible collection and not only pip install modules?
Yeh, collection or some other way. We'd explored a couple different things a year ago and it just never went anywhere, but still on the todo list.
A custom Collection should definitely be the way to go, unless you plan to submit the module for inclusion in one of the community collection. The documented installation methods (pip and ansible-galaxy install) have drawbacks, and copying the whole module into Ansible projects is not a very good idea either.
It shouldn't be too hard to enable collection support: https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html
This should also make it much easier to add an external collection to a project: https://github.com/ansible/ansible/pull/69154
Supposedly, it will install with ansible-galaxy. I haven't tested it though, see the readme https://github.com/TerryHowe/ansible-modules-hashivault/blob/master/README.rst
This is really overdue now. Collections are the way to install ansible modules. Hashivault is the only ansible module I have for which I have an exception, it causes a lot of pain because it pulls the latest full ansible version if you are not careful. For those who only want ansible-core, well too bad.
https://github.com/TerryHowe/ansible-modules-hashivault/blob/c65d67479897fce499ae4390e533ed874be0c29b/setup.py#L28-L29
Also, ansible-lint is now complaining about all hashivault tasks under fqcn[action-core] (all tasks names should use fqcn, but there is none since this is not a collection).