azure-cli
azure-cli copied to clipboard
az aks command failing with missing "azure.mgmt.containerservice.v2019_08_01" module
This is autogenerated. Please review and update as needed.
Describe the bug
Run azure cli on Ansible 2.8.5. When run command 'az aks get-credentials', no module named 'azure.mgmt.containerservice.v2019_08_01' is prompted.
Command Name
az aks get-credentials
Errors:
"ERROR: The command failed with an unexpected error. Here is the traceback:", "", "ERROR: No module named 'azure.mgmt.containerservice.v2019_08_01'", "Traceback (most recent call last):", " File \\"/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py\\", line 206, in invoke", " cmd_result = self.invocation.execute(args)", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py\\", line 528, in execute", " self.commands_loader.load_arguments(command)", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py\\", line 299, in load_arguments", " self.command_table[command].load_arguments() # this loads the arguments via reflection", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py\\", line 291, in load_arguments", " super(AzCliCommand, self).load_arguments()", " File \\"/usr/lib64/az/lib/python3.6/site-packages/knack/commands.py\\", line 97, in load_arguments", " cmd_args = self.arguments_loader()", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py\\", line 496, in default_arguments_loader", " op = handler or self.get_op_handler(operation, operation_group=kwargs.get('operation_group'))", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py\\", line 536, in get_op_handler", " op = import_module(mod_to_import)", " File \\"/usr/lib64/python3.6/importlib/__init__.py\\", line 126, in import_module", " return _bootstrap._gcd_import(name[level:], package, level)", " File \\"<frozen importlib._bootstrap>\\", line 994, in _gcd_import", " File \\"<frozen importlib._bootstrap>\\", line 971, in _find_and_load", " File \\"<frozen importlib._bootstrap>\\", line 955, in _find_and_load_unlocked", " File \\"<frozen importlib._bootstrap>\\", line 665, in _load_unlocked", " File \\"<frozen importlib._bootstrap_external>\\", line 678, in exec_module", " File \\"<frozen importlib._bootstrap>\\", line 219, in _call_with_frames_removed", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py\\", line 29, in <module>", " from ._helpers import _populate_api_server_access_profile, _set_load_balancer_sku, _set_vm_set_type", " File \\"/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/_helpers.py\\", line 8, in <module>", " from azure.mgmt.containerservice.v2019_08_01.models import ManagedClusterAPIServerAccessProfile", "ModuleNotFoundError: No module named 'azure.mgmt.containerservice.v2019_08_01'", "WARNING: ", "To open an issue, please run: 'az feedback'"
To Reproduce:
- enter ansible environment
cd /var/lib/awx/venv/ansible. bin/activateaz aks get-credentials --subscription {} --resource-group {} --name {} --overwrite-existing
Environment Summary
ansible 2.8.5
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Oct 7 2019, 17:58:22) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]
Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-centos-8.0.1905-Core
Python 3.6.8
Shell: bash
azure-cli 2.0.80
Additional Context
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm
Hello! Please try again with the latest Azure CLI version. Feel free to reopen an issue if it still doesn't work.
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest