Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

cannot issue the junos_vlans on the managed hosts

‎04-26-2020 05:53 AM

I tried to run a playbook and i recieve this error i use the junos_vlans to create vlans

The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/common/netconf.py", line 83, in parse_rpc_error
File "src/lxml/etree.pyx", line 3235, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1764, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
File "", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/junos/.ansible/tmp/ansible-local-34090g6pznr65/ansible-tmp-1587901627.7884014-11934885878336/AnsiballZ_junos_vlans.py", line 102, in
_ansiballz_main()
File "/home/junos/.ansible/tmp/ansible-local-34090g6pznr65/ansible-tmp-1587901627.7884014-11934885878336/AnsiballZ_junos_vlans.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/junos/.ansible/tmp/ansible-local-34090g6pznr65/ansible-tmp-1587901627.7884014-11934885878336/AnsiballZ_junos_vlans.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.network.junos.junos_vlans', 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_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/modules/network/junos/junos_vlans.py", line 283, in
File "/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/modules/network/junos/junos_vlans.py", line 278, in main
File "/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/junos/config/vlans/vlans.py", line 82, in execute_module
File "/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/junos/junos.py", line 251, in load_config
File "/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/common/netconf.py", line 76, in rpc
File "/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/common/netconf.py", line 108, in parse_rpc_error
ansible.module_utils.connection.ConnectionError: b'Opening and ending tag mismatch: routing-engine line 2 and nc:rpc-reply, line 6, column 16 (, line 6)'

fatal: [10.132.76.105]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/common/netconf.py\", line 83, in parse_rpc_error\n File \"src/lxml/etree.pyx\", line 3235, in lxml.etree.fromstring\n File \"src/lxml/parser.pxi\", line 1876, in lxml.etree._parseMemoryDocument\n File \"src/lxml/parser.pxi\", line 1764, in lxml.etree._parseDoc\n File \"src/lxml/parser.pxi\", line 1127, in lxml.etree._BaseParser._parseDoc\n File \"src/lxml/parser.pxi\", line 601, in lxml.etree._ParserContext._handleParseResultDoc\n File \"src/lxml/parser.pxi\", line 711, in lxml.etree._handleParseResult\n File \"src/lxml/parser.pxi\", line 640, in lxml.etree._raiseParseError\n File \"\", line 1\nlxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/junos/.ansible/tmp/ansible-local-34090g6pznr65/ansible-tmp-1587901627.7884014-11934885878336/AnsiballZ_junos_vlans.py\", line 102, in \n _ansiballz_main()\n File \"/home/junos/.ansible/tmp/ansible-local-34090g6pznr65/ansible-tmp-1587901627.7884014-11934885878336/AnsiballZ_junos_vlans.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/junos/.ansible/tmp/ansible-local-34090g6pznr65/ansible-tmp-1587901627.7884014-11934885878336/AnsiballZ_junos_vlans.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.network.junos.junos_vlans', 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_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/modules/network/junos/junos_vlans.py\", line 283, in \n File \"/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/modules/network/junos/junos_vlans.py\", line 278, in main\n File \"/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/junos/config/vlans/vlans.py\", line 82, in execute_module\n File \"/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/junos/junos.py\", line 251, in load_config\n File \"/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/common/netconf.py\", line 76, in rpc\n File \"/tmp/ansible_junos_vlans_payload_8t7zy9lb/ansible_junos_vlans_payload.zip/ansible/module_utils/network/common/netconf.py\", line 108, in parse_rpc_error\nansible.module_utils.connection.ConnectionError: b'Opening and ending tag mismatch: routing-engine line 2 and nc:rpc-reply, line 6, column 16 (, line 6)'\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}