-
Notifications
You must be signed in to change notification settings - Fork 332
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
Ansible Azure library version issues #130
Comments
The os is Ubuntu 18.04 |
Any update to this? |
#139 is related; updating to use newer azure libraries would resolve that too. |
@tigerkeeper5 Thank you for submitting this question, but I have never encountered the problem you encountered. Generally speaking, you only need to install ansible, azure.azcollection and related dependencies. You can uninstall conflicting packages and ansible, and try the following steps? Thank you!
|
@Fred-sun I appreciate the response, but that does not solve the problem at hand. The problem is that I need to leverage the azure.storage.blob library. The deprecated version of that library is azure-storage 0.35.1 which is what you guys use for the Azure Ansible modules. My Python script needs the azure.storage.blob and the ansible playbook needs azure-storage 0.35.1. These two libraries cannot coexist together. If you run
As you can see the azure-storage library is deprecated and they recommend to use the other collections. This is a bug in your guys' code. If you upgrade your libraries to use the current sdk's, this would solve the issue. Steps to recreate issue:
|
@UnwashedMeme After you install it, can you reinstall azure-cli(the reason for the error) and try again? Thank you!
|
@UnwashedMeme Any feedback for this? |
@Fred-sun I haven't really looked at this; @tigerkeeper5 is the one having trouble. From reading this post I expect he still has the same problem because the requirements-azure.txt file (the current HEAD of dev) still references I notice that this is part of the broader issue this collection has with using out of date azure libraries. That's why I asked if there was any plan to systematically upgrade. |
Thanks @UnwashedMeme. |
I'm having the exact same issue. The requirement for azure-cli, even when deployed in a manner consistent with how Microsoft official Docker If someone can provide which version of ansible[azure] is compatible with a certain version of azure cli, I'm able to control the version of either when creating my docker image. Right now I'm using |
Hi. Any updates on this topic? I am also facing similar difficulties when trying to use either ansible[azure] 2.9, and ansible-base 2.10. Thanks |
Here's a docker file I use to builds the perfect ansible / azure cli / kubernetes container I use to run my azure / kubernetes ansible playbooks. If anyone knows of a simpler approach to this please advise. |
I can't use If anyone is successfully using |
does clicking on the thumbs up here on the initial comment have any impact to prioritization? it's pretty surprising how far behind this is re: azure python sdk. i also had to do some reworking of other dependencies to support how far behind this is. 😱 is there someone from azure that maintains this stuff? if so, this makes it harder for me to give you money. please fix. |
@jfreeland We are preparing to update all depend packages! once upgrade, I will add comment in here! Thank you very much! |
any update @Fred-sun ? |
@tadrian88 Recently, because I am busy with other things, the update has not been completed. Thank you very much! |
@Fred-sun Is there a timeline for the dependency package update? Is there anything I can do to assist the effort? Thank you! |
This is in the plan temporarily, the specific completion time has not been determined. Thank you very much! |
I have started work on updating the azure-storage dependency in #833 and hope to complete this week! |
Hi @l3ender - any update on this ? thanks a lot! |
@jdelvecchio Yes, #833 is ready and waiting for review from @Fred-sun! Thank you! |
This issue has been resolved with #833. It is merged to dev and should be included in the next release (>v1.13.0). Please note that if you are updating an existing python environment with previously-installed dependencies, you will need to explicitly uninstall the old storage dependency (do this before installing the updated from requirements-azure.txt): pip uninstall azure-storage Thanks! |
To me, this is not resolved yet.
And this takes ~3mins to run |
@jdelvecchio - as mentioned in #130 (comment), the change has been merged to dev but is not yet released. It should be included in the next release (likely to be version 1.14.0). You can install the collection from the repo's Hope that helps--thanks! |
SUMMARY
As requested, I have moved this to here from here.
I have an app that I running in a Docker container to create Azure resources utilizing Ansible and Python. I have installed the necessary arm modules with
pip install ansible[azure]
to enable Ansible to work with Azure. For my Python script i am using the current azure-storage-blob, azure-mgmt-resource, and azure-common libraries. Everything with my app works and does what it needs to do locally.The required Ansible libraries for Azure are listed here These versions are extremely outdated. The problem I am facing is on the build of the Docker image, the required libraries for Ansible are being installed (using
pip install ansible[azure]
) and then when I install the necessary libraries for the Python script (azure-storage-blob, azure-mgmt-resource, and azure-common) pip is blowing away the old versions needed for Ansible. Those three that I need for Python are in the list of required Ansible libraries hence why they are being blown away. It's a lose lose situation. If I want the python script to work, I need relatively current Azure libraries. If I want my playbooks to work, I need to use the very dated libraries. Is there anything I can do to get these libraries from uninstalling each other? I am not too sure if there is anything that can be done, but I think its definitely something that should be brought up.I believe the azure-storage-blob module is what is breaking my playbook. In the list of libraries needed for Ansible, it requires the module azure-storage 0.35.1. This has been deprecated for a long time now and was replaced by azure-storage-blob. azure-storage-blob is on version 12.0.
Examples of the uninstalls during the Docker run:
Installing collected packages: azure-mgmt-resource
Attempting uninstall: azure-mgmt-resource
Found existing installation: azure-mgmt-resource 2.1.0
Uninstalling azure-mgmt-resource-2.1.0:
Successfully uninstalled azure-mgmt-resource-2.1.0
Successfully installed azure-mgmt-resource-9.0.0
2.1 is what's needed and being used still? They are up to 9.0.
Installing collected packages: azure-core, msrest, azure-storage-blob
Attempting uninstall: msrest
Found existing installation: msrest 0.6.1
Uninstalling msrest-0.6.1:
Successfully uninstalled msrest-0.6.1
Successfully installed azure-core-1.5.0 azure-storage-blob-12.3.0 msrest-0.6.14
pip3 freeze | grep azure
results:These are the versions that I ran the playbook with below.
azure-cli-core==2.0.35
azure-cli-nspkg==3.0.2
azure-common==1.1.25
azure-core==1.5.0
azure-graphrbac==0.40.0
azure-keyvault==1.0.0a1
azure-mgmt-authorization==0.51.1
azure-mgmt-automation==0.1.1
azure-mgmt-batch==5.0.1
azure-mgmt-cdn==3.0.0
azure-mgmt-compute==4.4.0
azure-mgmt-containerinstance==1.4.0
azure-mgmt-containerregistry==2.0.0
azure-mgmt-containerservice==4.4.0
azure-mgmt-cosmosdb==0.5.2
azure-mgmt-devtestlabs==3.0.0
azure-mgmt-dns==2.1.0
azure-mgmt-hdinsight==0.1.0
azure-mgmt-iothub==0.7.0
azure-mgmt-keyvault==1.1.0
azure-mgmt-loganalytics==0.2.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-monitor==0.5.2
azure-mgmt-network==2.3.0
azure-mgmt-nspkg==2.0.0
azure-mgmt-rdbms==1.4.1
azure-mgmt-redis==5.0.0
azure-mgmt-resource==9.0.0
azure-mgmt-servicebus==0.5.3
azure-mgmt-sql==0.10.0
azure-mgmt-storage==3.1.0
azure-mgmt-trafficmanager==0.50.0
azure-mgmt-web==0.41.0
azure-nspkg==2.0.0
azure-storage==0.35.1
azure-storage-blob==12.3.0
msrestazure==0.5.0
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
This is just a snippet of the playbook I am using but it is erroring out because the azure-storage-blob library and azure-storage library cannot coexist. I know this because running the playbook without the azure-storage-library installed, it works.
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: