Skip to content

Azure module error while creating a resource group #8

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

Open
manikjain opened this issue May 10, 2023 · 0 comments · May be fixed by #9
Open

Azure module error while creating a resource group #8

manikjain opened this issue May 10, 2023 · 0 comments · May be fixed by #9

Comments

@manikjain
Copy link

manikjain commented May 10, 2023

Hello, I received an error while trying to execute the azure playbook. The error indicates that requirements-azure.txt is not up-to-date with https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt. I was able to fix this after updating requirements-azure.txt in the repository with https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt.

Problem

% ansible-playbook azure.playbook.yml -t standup -e '{ "azure_vm_size": "Standard_F2s_v2", "test_services": [ "tyk", "kong" ] }'
​
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
​
PLAY [Create Azure instances] **********************************************************************************************************************************************
​
TASK [azure : Include standup task] ****************************************************************************************************************************************
included: /Users/USER/tyk-ansible-performance-testing/roles/azure/tasks/standup.yml for localhost
​
TASK [azure : Create a resource group Standard_F2s_v2-resource-group] ******************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: ResourceManagementClient.__init__() got an unexpected keyword argument 'credential'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/Users/USER/.ansible/tmp/ansible-tmp-1683748585.578826-65282-235491957817187/AnsiballZ_azure_rm_resourcegroup.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/Users/USER/.ansible/tmp/ansible-tmp-1683748585.578826-65282-235491957817187/AnsiballZ_azure_rm_resourcegroup.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/Users/USER/.ansible/tmp/ansible-tmp-1683748585.578826-65282-235491957817187/AnsiballZ_azure_rm_resourcegroup.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.azure.azcollection.plugins.modules.azure_rm_resourcegroup', init_globals=dict(_module_fqn='ansible_collections.azure.azcollection.plugins.modules.azure_rm_resourcegroup', _modlib_path=modlib_path),\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 286, in <module>\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 282, in main\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 162, in __init__\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py\", line 472, in __init__\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_resourcegroup.py\", line 178, in exec_module\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py\", line 1101, in rm_client\n  File \"/var/folders/vv/fw548pgn6sjgv53c61jypvdc0000gp/T/ansible_azure_rm_resourcegroup_payload_4japsyhq/ansible_azure_rm_resourcegroup_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py\", line 950, in get_mgmt_svc_client\nTypeError: ResourceManagementClient.__init__() got an unexpected keyword argument 'credential'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
​
PLAY RECAP *****************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Solution

Update requirements-azure.txt in the repository with https://github.com/ansible-collections/azure/blob/dev/requirements-azure.txt.

@manikjain manikjain linked a pull request May 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant