Closed mtb-xt closed 4 years ago
Could anyone merge it pls?
@tboerger seems I don't have merge permissions.
Updating ansible is totally fine, but I'm not sure about boto install, so far we are installing only requests via the alpine package.
In theory you could also just use the requirements attribute within drone to install dependencies for your use case in the standard requirements.txt format.
Besides that I need to check if we got a tagged release for the previous version :)
@tboerger ansible's aws modules are unusable without boto included.
are you saying I need to run pip install -r requirements.txt
inside the plugin every time it runs?
Then this plugin is useless <_< What's the point of having only partially-working ansible plugin?
The plugin is doing the pip install automatically if you provide a path to a requirements.txt.
And this plugin is even in that case not useless as it's working pretty well. It just doesn't install all possible python modules.
The plugin isn't working partially. But how should we cover every possible dynamic inventory hacking? I'm using dynamic inventory pretty much (not on aws) without the need to install any additional module.
re - requirements.txt - it still means a delay and unnecessary downloads every time a step with this plugin runs.
I apologize for the tone, but really, using AWS for dynamic inventories and to manipulate AWS resources would seem a pretty common Ansible use-case, not a hacking.
I guess we can always build our own image of the plugin, but in my opinion, that makes drone much less usable.
EDIT: What's wrong with including most common python modules, that Ansible needs? Even if plugin image becomes bigger, it's downloaded once and stays in docker image cache. Installing requirements would happen every time.
Generally it's encouraged to fork the plugins and add custom logic that is required for individuals.
After thinking about it I'm fine to add required dependencies for the 3 big major cloud providers aws, gcp and azure.
But instead of installing these deps via pip directly I would prefer the alpine packages for it, e.g. py-boto, similar to py-requests.
I will also soonish tag a new release and upgrade python to version 3 as 2.7 will reach eol more or less soon.
py-boto is boto 2 in alpine. py3-boto3 and py3-botocore are only available in testing AFAIK
you want me to update the PR, or wait till you update it to python3?
If these modules are only packaged for python3 we should do the upgrade first.
I have tagged the current plugin as v1.3.0, now I have created a PR to upgrade python to version 3. After merging my PR I will tag it as v2.0.0: https://github.com/drone-plugins/drone-ansible/pull/27
Ah, and after merging my PR you only got to add py3-boto
behind py3-requests
:)
Hello.
This PR updates Ansible version to the latest minor version, it also adds boto libraries which are required for every aws-related module (and for dynamic inventories too...)