Hi
I am getting the following error whenever I try to control an Azure VM to start or stop:
The full traceback is:
Traceback (most recent call last):
File “/tmp/ansible-tmp-1559657705.67-271285273530579/AnsiballZ_azure_rm_virtualmachine.py”, line 114, in
_ansiballz_main()
File “/tmp/ansible-tmp-1559657705.67-271285273530579/AnsiballZ_azure_rm_virtualmachine.py”, line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File “/tmp/ansible-tmp-1559657705.67-271285273530579/AnsiballZ_azure_rm_virtualmachine.py”, line 49, in invoke_module
imp.load_module(‘main’, mod, module, MOD_DESC)
File “/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py”, line 2045, in
File “/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py”, line 2041, in main
File “/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py”, line 853, in init
File “/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/ansible_azure_rm_virtualmachine_payload.zip/ansible/module_utils/azure_rm_common.py”, line 325, in init
File “/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py”, line 1434, in exec_module
KeyError: ‘diskSizeGB’
fatal: [localhost]: FAILED! => {
“changed”: false,
“module_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible-tmp-1559657705.67-271285273530579/AnsiballZ_azure_rm_virtualmachine.py", line 114, in \n _ansiballz_main()\n File "/tmp/ansible-tmp-1559657705.67-271285273530579/AnsiballZ_azure_rm_virtualmachine.py", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/tmp/ansible-tmp-1559657705.67-271285273530579/AnsiballZ_azure_rm_virtualmachine.py", line 49, in invoke_module\n imp.load_module(‘main’, mod, module, MOD_DESC)\n File "/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py", line 2045, in \n File "/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py", line 2041, in main\n File "/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py", line 853, in init\n File "/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/ansible_azure_rm_virtualmachine_payload.zip/ansible/module_utils/azure_rm_common.py", line 325, in init\n File "/tmp/ansible_azure_rm_virtualmachine_payload_I72j_4/main.py", line 1434, in exec_module\nKeyError: ‘diskSizeGB’\n”,
“module_stdout”: “”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}
In the playbook, I have it configured as follows:
- azure_rm_virtualmachine:
resource_group: RESOURCEGROUP
name:
started: yes
allocated: yes
or
- azure_rm_virtualmachine:
resource_group: RESOURCEGROUP
name:
started: no
allocated: no
Somehow I got it to work for one of my VMs, but it is not working others.