You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using azure_rm_networkinterface module in my playbook. Various parameters, notably application_security_groups can be provided to the play via extra vars. In this case, null was provided as the value to application_security_groups variable, resulting in the following error message:
...snip...
...line 629, in exec_module
KeyError: 'name'
...snip...
MODULE FAILURE
See stdout/stderr for the exact error
Would have been beneficial to see something along the lines of application_security_groups is undefined or something a bit more helpful than MODULE FAILURE. I'll admit to spending quite a bit of time troubleshooting a somewhat trivial data input/checking issue.
Would like to see a more helpful/descriptive error message such as 'application_security_groups value not provided' or something a bit more descriptive than 'MODULE ERROR'.
ACTUAL RESULTS
TASK [azure_provision_linux_vm : Create a Private Network interface for VM azrs91017] ***
task path: /var/lib/awx/tmp/awx_53175_tbb90c67/project/roles/azure_provision_linux_vm/tasks/main.yml:21
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: awx
<127.0.0.1> EXEC /bin/sh -c 'echo ~awx && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020 `" && echo ansible-tmp-1611245062.41-19261962902020="` echo /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020 `" ) && sleep 0'
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/_text.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/azure_rm_common.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/basic.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/ansible_release.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/validation.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/text/converters.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/warnings.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/__init__.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/text/__init__.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/process.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/_utils.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/_collections_compat.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/_json_compat.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/sys_info.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/parameters.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/file.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/common/collections.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/distro/__init__.py
Using module_utils file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/module_utils/distro/_distro.py
Using module file /opt/ansible/azure-20200212/lib/python2.7/site-packages/ansible/modules/cloud/azure/azure_rm_networkinterface.py
<127.0.0.1> PUT /var/lib/awx/.ansible/tmp/ansible-local-7kE7LN9/tmpWFw8eF TO /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/ /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/opt/ansible/azure-20200212/bin/python /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py", line 102, in <module>
_ansiballz_main()
File "/var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.cloud.azure.azure_rm_networkinterface', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py", line 877, in <module>
File "/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py", line 873, in main
File "/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py", line 595, in __init__
File "/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/module_utils/azure_rm_common.py", line 417, in __init__
File "/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py", line 629, in exec_module
KeyError: 'name'
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\\n File \\"/var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py\\", line 102, in <module>\\n _ansiballz_main()\\n File \\"/var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py\\", line 94, in _ansiballz_main\\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\\n File \\"/var/lib/awx/.ansible/tmp/ansible-tmp-1611245062.41-19261962902020/AnsiballZ_azure_rm_networkinterface.py\\", line 40, in invoke_module\\n runpy.run_module(mod_name='ansible.modules.cloud.azure.azure_rm_networkinterface', init_globals=None, run_name='__main__', alter_sys=True)\\n File \\"/usr/lib64/python2.7/runpy.py\\", line 176, in run_module\\n fname, loader, pkg_name)\\n File \\"/usr/lib64/python2.7/runpy.py\\", line 82, in _run_module_code\\n mod_name, mod_fname, mod_loader, pkg_name)\\n File \\"/usr/lib64/python2.7/runpy.py\\", line 72, in _run_code\\n exec code in run_globals\\n File \\"/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py\\", line 877, in <module>\\n File \\"/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py\\", line 873, in main\\n File \\"/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py\\", line 595, in __init__\\n File \\"/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/module_utils/azure_rm_common.py\\", line 417, in __init__\\n File \\"/tmp/ansible_azure_rm_networkinterface_payload_bA5FHB/ansible_azure_rm_networkinterface_payload.zip/ansible/modules/cloud/azure/azure_rm_networkinterface.py\\", line 629, in exec_module\\nKeyError: 'name'\\n",
"module_stdout": "",
"msg": "MODULE FAILURE\\nSee stdout/stderr for the exact error",
"rc": 1
}
The text was updated successfully, but these errors were encountered:
SUMMARY
Using azure_rm_networkinterface module in my playbook. Various parameters, notably application_security_groups can be provided to the play via extra vars. In this case, null was provided as the value to application_security_groups variable, resulting in the following error message:
Would have been beneficial to see something along the lines of application_security_groups is undefined or something a bit more helpful than MODULE FAILURE. I'll admit to spending quite a bit of time troubleshooting a somewhat trivial data input/checking issue.
ISSUE TYPE
COMPONENT NAME
azure_rm_networkinterface
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Host is RHEL7; can duplicate with or outside of Ansible Tower.
STEPS TO REPRODUCE
Extra Vars:
EXPECTED RESULTS
Would like to see a more helpful/descriptive error message such as 'application_security_groups value not provided' or something a bit more descriptive than 'MODULE ERROR'.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: