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
{{ message }}
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
I'm having module error while running nsx_logical_switch modules.
below is the errors, any idea?
`[wcpoon@control vmware]$ ap test_logicalswitch.yml -vvv
ansible-playbook 2.9.11
config file = /home/wcpoon/vmware/ansible.cfg
configured module search path = ['/home/wcpoon/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.6.8 (default, Dec 5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/wcpoon/vmware/ansible.cfg as config file
vmware_vm_inventory declined parsing /home/wcpoon/vmware/inventory as it did not pass its verify_file() method
[WARNING]: Unable to parse /home/wcpoon/vmware/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAYBOOK: test_logicalswitch.yml ********************************************************************************************************************************************************************************************************
1 plays in test_logicalswitch.yml
Read vars_file 'answerfile.yml'
Read vars_file 'answerfile.yml'
Read vars_file 'answerfile.yml'
PLAY [Create new NSX Logical Switch] ****************************************************************************************************************************************************************************************************
META: ran handlers
Read vars_file 'answerfile.yml'
TASK [logicalSwitch Operation] **********************************************************************************************************************************************************************************************************
task path: /home/wcpoon/vmware/test_logicalswitch.yml:9
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: wcpoon
<127.0.0.1> EXEC /bin/sh -c 'echo ~wcpoon && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/wcpoon/.ansible/tmp"&& mkdir /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021 && echo ansible-tmp-1597135580.0430148-266473-258142137074021="echo /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021" ) && sleep 0'
Using module file /usr/share/ansible/plugins/modules/nsxansible/library/nsx_logical_switch.py
<127.0.0.1> PUT /home/wcpoon/.ansible/tmp/ansible-local-266466az3bqn47/tmpwk3zcyot TO /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/ /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/libexec/platform-python /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 102, in
_ansiballz_main()
File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.nsx_logical_switch', init_globals=None, run_name='main', alter_sys=True)
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 125, in
File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 85, in main
File "/usr/local/lib/python3.6/site-packages/nsxramlclient/client.py", line 176
print et.tostring(xml_schema_result, pretty_print=True)
^
SyntaxError: invalid syntax
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 102, in \n _ansiballz_main()\n File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.nsx_logical_switch', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 125, in \n File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 85, in main\n File "/usr/local/lib/python3.6/site-packages/nsxramlclient/client.py", line 176\n print et.tostring(xml_schema_result, pretty_print=True)\n ^\nSyntaxError: invalid syntax\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Hi,
I'm having module error while running nsx_logical_switch modules.
below is the errors, any idea?
`[wcpoon@control vmware]$ ap test_logicalswitch.yml -vvv
ansible-playbook 2.9.11
config file = /home/wcpoon/vmware/ansible.cfg
configured module search path = ['/home/wcpoon/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.6.8 (default, Dec 5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/wcpoon/vmware/ansible.cfg as config file
vmware_vm_inventory declined parsing /home/wcpoon/vmware/inventory as it did not pass its verify_file() method
[WARNING]: Unable to parse /home/wcpoon/vmware/inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAYBOOK: test_logicalswitch.yml ********************************************************************************************************************************************************************************************************
1 plays in test_logicalswitch.yml
Read vars_file 'answerfile.yml'
Read vars_file 'answerfile.yml'
Read vars_file 'answerfile.yml'
PLAY [Create new NSX Logical Switch] ****************************************************************************************************************************************************************************************************
META: ran handlers
Read vars_file 'answerfile.yml'
TASK [logicalSwitch Operation] **********************************************************************************************************************************************************************************************************
task path: /home/wcpoon/vmware/test_logicalswitch.yml:9
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: wcpoon
<127.0.0.1> EXEC /bin/sh -c 'echo ~wcpoon && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "
echo /home/wcpoon/.ansible/tmp
"&& mkdir /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021 && echo ansible-tmp-1597135580.0430148-266473-258142137074021="echo /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021
" ) && sleep 0'Using module file /usr/share/ansible/plugins/modules/nsxansible/library/nsx_logical_switch.py
<127.0.0.1> PUT /home/wcpoon/.ansible/tmp/ansible-local-266466az3bqn47/tmpwk3zcyot TO /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/ /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/libexec/platform-python /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 102, in
_ansiballz_main()
File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.nsx_logical_switch', init_globals=None, run_name='main', alter_sys=True)
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 125, in
File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 85, in main
File "/usr/local/lib/python3.6/site-packages/nsxramlclient/client.py", line 176
print et.tostring(xml_schema_result, pretty_print=True)
^
SyntaxError: invalid syntax
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 102, in \n _ansiballz_main()\n File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/wcpoon/.ansible/tmp/ansible-tmp-1597135580.0430148-266473-258142137074021/AnsiballZ_nsx_logical_switch.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.nsx_logical_switch', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 125, in \n File "/tmp/ansible_nsx_logical_switch_payload__i7tw5d8/ansible_nsx_logical_switch_payload.zip/ansible/modules/nsx_logical_switch.py", line 85, in main\n File "/usr/local/lib/python3.6/site-packages/nsxramlclient/client.py", line 176\n print et.tostring(xml_schema_result, pretty_print=True)\n ^\nSyntaxError: invalid syntax\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
PLAY RECAP ******************************************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
`
The text was updated successfully, but these errors were encountered: