ansible / ansible-modules-core

Ansible modules - these modules ship with ansible
1.3k stars 1.95k forks source link

azure_rm_deployment: InvalidClientIdError: (invalid_request) AADSTS90002: Requested tenant identifier 'xxxxxx.com'' is not valid. #5892

Closed arunjohn closed 7 years ago

arunjohn commented 7 years ago

I am getting this error while using the azure module:

<xx.xx.xx.xx> SSH: EXEC sshpass -d12 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o User=devops-admin -o ConnectTimeout=60 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r -tt xx.xx.xx.xx'/bin/sh -c '"'"'/usr/bin/python /home/devops-admin/.ansible/tmp/ansible-tmp-1486478078.17-48558132959337/azure_rm_deployment.py; rm -rf "/home/devops-admin/.ansible/tmp/ansible-tmp-1486478078.17-48558132959337/" > /dev/null 2>&1 && sleep 0'"'"''
fatal: [xx.xx.xx.xx]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_name": "azure_rm_deployment"
    },
    "module_stderr": "OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 38011\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to xx.xx.xx.xx closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_di41Y5/ansible_module_azure_rm_deployment.py\", line 660, in <module>\r\n    main()\r\n  File \"/tmp/ansible_di41Y5/ansible_module_azure_rm_deployment.py\", line 656, in main\r\n    AzureRMDeploymentManager()\r\n  File \"/tmp/ansible_di41Y5/ansible_module_azure_rm_deployment.py\", line 438, in __init__\r\n    supports_check_mode=False)\r\n  File \"/tmp/ansible_di41Y5/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py\", line 175, in __init__\r\n  File \"/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py\", line 335, in __init__\r\n    self.set_token()\r\n  File \"/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py\", line 370, in set_token\r\n    raise_with_traceback(AuthenticationError, \"\", err)\r\n  File \"/usr/lib/python2.7/site-packages/msrest/exceptions.py\", line 50, in raise_with_traceback\r\n    raise error\r\nmsrest.exceptions.AuthenticationError: , InvalidClientIdError: (invalid_request) AADSTS90002: Requested tenant identifier 'xxxxxx.com'' is not valid.\r\r\nTrace ID: e7a1f875-xxxxx-48ea-a3a1-xxxxxx\r\r\nCorrelation ID: xxxxxxx-48cb-44f1-830c-xxxxxxx\r\r\nTimestamp: 2017-02-07 14:34:41Z\r\n",
    "msg": "MODULE FAILURE"
}

I am use the following python modules:

 pip list | grep azure
azure (2.0.0rc5)
azure-batch (0.30.0rc5)
azure-common (1.1.4)
azure-graphrbac (0.30.0rc5)
azure-mgmt (0.30.0rc5)
azure-mgmt-authorization (0.30.0rc5)
azure-mgmt-batch (0.30.0rc5)
azure-mgmt-cdn (0.30.0rc5)
azure-mgmt-cognitiveservices (0.30.0rc5)
azure-mgmt-commerce (0.30.0rc5)
azure-mgmt-compute (0.30.0rc5)
azure-mgmt-keyvault (0.30.0rc5)
azure-mgmt-logic (0.30.0rc5)
azure-mgmt-network (0.30.0)
azure-mgmt-notificationhubs (0.30.0rc5)
azure-mgmt-nspkg (1.0.0)
azure-mgmt-powerbiembedded (0.30.0rc5)
azure-mgmt-redis (0.30.0rc5)
azure-mgmt-resource (0.30.0rc5)
azure-mgmt-scheduler (0.30.0rc5)
azure-mgmt-storage (0.30.0rc5)
azure-mgmt-web (0.30.0rc5)
azure-nspkg (1.0.0)
azure-servicebus (0.20.2)
azure-servicemanagement-legacy (0.20.3)
azure-storage (0.32.0)
msrestazure (0.4.7)

I had passed the following values in the file ~/.azure/credentials

subscription_id=xxxx......... client_id=xxxx....... secret=xxxx....... tenant=xxxx........

ansibot commented 7 years ago

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide.