PratikMuluk-6937 avatar image
0 Votes"
PratikMuluk-6937 asked karishmatiwari-msft commented

Unable to create azure instances using ansible.

Below is the ansible version that is. been used:

ansible 2.9.17
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

Below is the error that is raised :

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1631515175.731227-1724-163848420676453/\", line 102, in <module>\n ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1631515175.731227-1724-163848420676453/\", line 94, in ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1631515175.731227-1724-163848420676453/\", line 40, in invoke_module\n runpy.run_module(mod_name='', init_globals=None, run_name='main', alter_sys=True)\n File \"/usr/lib64/python3.6/\", line 205, in run_module\n return run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/\", line 96, in run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/\", line 85, in run_code\n exec(code, run_globals)\n File \"/tmp/ansible_azure_rm_virtualmachine_payload_9pmxn731/\", line 2202, in <module>\n File \"/tmp/ansible_azure_rm_virtualmachine_payload_9pmxn731/\", line 2198, in main\n File \"/tmp/ansible_azure_rm_virtualmachine_payload_9pmxn731/\", line 901, in init\n File \"/tmp/ansible_azure_rm_virtualmachine_payload_9pmxn731/\", line 343, in init\n File \"/tmp/ansible_azure_rm_virtualmachine_payload_9pmxn731/\", line 1215, in init\n File \"/usr/local/lib/python3.6/site-packages/msrestazure/\", line 354, in init_\n self.set_token()\n File \"/usr/local/lib/python3.6/site-packages/msrestazure/\", line 366, in set_token\n self.secret\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 179, in acquire_token_with_client_credentials\n return self._acquire_token(token_func)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 128, in _acquire_token\n return token_func(self)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 177, in token_func\n return token_request.get_token_with_client_credentials(client_secret)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 312, in get_token_with_client_credentials\n token = self._oauth_get_token(oauth_parameters)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 112, in _oauth_get_token\n return client.get_token(oauth_parameters)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 276, in get_token\n return self._handle_get_token_response(resp.text)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 238, in _handle_get_token_response\n return self.validate_token_response(body)\n File \"/usr/local/lib/python3.6/site-packages/adal/\", line 168, in validate_token_response\n wire_response = json.loads(body)\n File \"/usr/lib64/python3.6/json/\", line 354, in loads\n return _default_decoder.decode(s)\n File \"/usr/lib64/python3.6/json/\", line 339, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File \"/usr/lib64/python3.6/json/\", line 358, in raw_decode\n raise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I would need further details to understand this issue better.
Can you please share the following:
1. Your scenario, share any documents you are following to achieve this, your end goal
2. Azure Subscription Type

0 Votes 0 ·

0 Answers