-
Notifications
You must be signed in to change notification settings - Fork 330
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
Failed to import the required Python library (ansible[azure] (azure >= 2.0.0) #1463
Comments
@thisguyshouldworkforus I created an issue for what we are seeing. |
@ericcames After you installed aze.azcollection, did you install the related dependency files? Reinstall all dependent files and try again. Thank you! |
@Fred-sun thank you for the feedback. When I read the dependencies section of the documentation is says there are none. I am installing the collections via the collections directory and a requirements file. Not sure if you are redhat employee or not if you are you can find me via [email protected]. I am working with a customer to prove out that this collection works in their environment. We are looking for ideas on how to get this collection working. Thanks for your feedback! |
I think the console is not loading dependencies correctly. You can see the python dependencies in the repo for the collection: https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt Since you're using AAP, you should have access to the supported EE that includes these dependencies, IIRC |
Tried the requirements-azure.txt with python3.6 and 3.7 both report "msgraph-sdk==1.0.0 not found". |
@alexander-aps tagging |
@skertz This error is strange because we did not ask to install 'azure-storage'. Could you please provide your detailed execution environment and error information? Thank you! |
@ericcames Can you provide 'pip3 freeze' information and python version information? Thank you! |
@Fred-sun are you wanting this from the container or the controller?? This is the container we are using registry.redhat.io/ansible-automation-platform-23/ee-29-rhel8:latest |
@Fred-sun we created quay.io/zigfreed/ee-azure:latest and have validated that it works as expected with three other asure collections. ---
|
This one does not work: ---
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: error: MainError(additional_data={}, code='BadRequest', details=None, inner_error=InnerError(additional_data={'date': DateTime(2024, 2, 27, 12, 7, 25, tzinfo=Timezone('UTC'))}, client_request_id='24c090c3-8b51-4d10-bba2-d93ba2af6560', date=None, odata_type=None, request_id='f5d97fd3-a0cd-4f9e-8e69-02c50dd1c1b5'), message='/me request is only valid with delegated authentication flow.', target=None) |
Redhat 8 ansible [core 2.15.3] Install:
(python3 is 3.6)
SUCCEEDS, but then: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'azure.storage.cloudstorageaccount' Isn't azure-mgmt-storage and azure-storage-blob defined in the requirements? |
@skertz There are definitions, all of our requirements files are in ~/ requirements-aze.txt. Thank you!
|
@Fred-sun we built these into the execution environment we are using for testing. quay.io/zigfreed/ee-azure:latest |
I'm getting this exact error trying to use I have installed using pipx install --include-deps ansible
pipx runpip ansible install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt My ansible configuration: ❯ ansible --version
ansible [core 2.16.4]
config file = /home/dwales/.ansible.cfg
configured module search path = ['/home/dwales/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/dwales/.local/pipx/venvs/ansible/lib/python3.10/site-packages/ansible
ansible collection location = /home/dwales/.ansible/collections:/usr/share/ansible/collections
executable location = /home/dwales/.local/bin/ansible
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/home/dwales/.local/pipx/venvs/ansible/bin/python)
jinja version = 3.1.3
libyaml = True Error message:
I think the problem is that it's trying to import |
@ericcames Sorry, there is an issue that has not been clarified, graphrbac migrated to msgraph, supported python version >=3.8. Please use aze.azcollection >=2.0.0 to run only in an environment higher than python3.8. Thank you! |
@Fred-sun Thank you! |
@ericcames Are you trying the new version? Has the problem been solved? |
I got the same issue and after many try/error, I succeed after manually install python3, ansible on the target computer. Then, I also installed the azure collection and run pip3 install .../requirements/txt all manipulations had been done with root |
@nimbusparis What does your error message look like? Can you provide a detailed log? Thank you! |
Well, now, I don't have the issue anymore, I can try to uninstall the collection and python module, but I hope it wouldn't break anything! 😆 |
Here the vvvv log, hops it could help.
|
@nimbusparis Can you provide your test script? I'd like to try, thank you very much! |
Inventory:
group_vars/ovh.yaml
Playbook:
|
SUMMARY
Trying to use this module azure.azcollection.azure_rm_account_info with ansible automation platform 2.3 and we are getting the failure list in the title
ISSUE TYPE
COMPONENT NAME
azure.azcollection.azure_rm_account_info
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
azure subscription account
AAP 2.3 on RHEL 8
STEPS TO REPRODUCE
Set up a Microsoft Azure Resource Manager credential in AAP
Create a template to run the playbook listed below
Use this execution environment: quay.io/seanlee/ee-azure:1.12.0
EXPECTED RESULTS
I expect the playbook to pull back the account info.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: