-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate ansible_mitogen.plugins to ansible collections #961
Comments
It may be worth it. Mitogen itself may resides in module_utils. This will solve problems with paths. But can strategy plugin resides in a collection? |
@amarao Hi! Just a simple check: https://github.com/ITD27M01/ansible-strategy-collection |
This is really helpful. I believe, this is natural way for mitogen. But those changes requires actions from core maintainers, because galaxy namespace must be allocated, and upload process should be configured. |
Hi @amarao, It is a workaround for me for now, I will create such collection in our private repo. |
I've just discussed this idea with colleagues, and we found one additional case to consider. In some projects we run ansible with mitogen like this:
This allows to have unmodified playbooks to run with mitogen or without. I really like to keep this feature. How to specify env vars if mitogen is installed as a collection? |
@amarao As I understand these variables are helpers for settings. So, the same way as plugins defined in ansible.cfg they could be defined there:
|
We've just released an alternative collection for Mitogen, which allow to to use it via galaxy (you still need to |
Is there a way to exclude Example. I use my ansible repo in several places:
Typical workflow is:
With
just in Another example: if I include mitogen git repo in my ansible repo as a submodule, I will still need to do just 2 steps - |
You can vendor mitogen into your repo and install it locally (from the repo). I really don't want to bring mitogen code under maintenance. I love it, I use it, but I don't dare to peek inside. (Also, there are many Ansible modules which require you to have specific python libraries: netaddr, openstacksdk, requests, etc), so, realistically, you still need to pip install before running the code. |
For those dealing with this until it's solved one way or another, I use a python snippet to autoconfigure
|
Is your version of Ansible patched in any way?
No
Are you running with any custom modules, or
module_utils
loaded?A lot of modules from different Ansible collections
Have you tried the latest master version from Git?
No
Mention your host and target OS and versions
Ubuntu 22.04
Mention your host and target Python versions
3.8 or 3.10
Hi, thank you for such amazing plugin!
The new convenient distribution format for Ansible plugins/modules is Ansible Collections. Any plugin either inventory/action/lookup/strategy plugin or Ansible-module could be packaged to such collection and distributed to end users via Ansible Galaxy or collection git repo. All the python code for Ansible (except SDK libraries) should be distributed as a collection and the user experience will be as follows:
It dramatically simplifies the usage and environment setup.
The good collections examples are collections for cloud providers such as AWS or OpenStack:
https://github.com/ansible-collections/amazon.aws
https://github.com/openstack/ansible-collections-openstack
The text was updated successfully, but these errors were encountered: