Hello all,
I've just started to play with Ansible.
When I run playbook which should create int Vlan, the Vlan is created but
the playbook ends with errors.
tasks:
- name: Create interface
nxos_interface:
interface: Vlan50
description: "Description"
PLAY [vlan testing]
************************************************************************************************************************************************************************************************************************************************
TASK [Create interface]
********************************************************************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use
-vvv. The error was: NameError: global name 'ShellError' is not defined
fatal: [nxos2]: FAILED! => {"changed": false, "failed": true,
"module_stderr": "Traceback (most recent call last):\n File
\"/tmp/ansible_BLr8ZB/ansible_module_nxos_interface.py\", line 763, in
<module>\n main()\n File \"/tmp/ansible_BLr8ZB/ansible_module_
nxos_interface.py\", line 675, in main\n existing, is_default =
smart_existing(module, intf_type, normalized_interface)\n File
\"/tmp/ansible_BLr8ZB/ansible_module_nxos_interface.py\", line 559, in
smart_existing\n existing = get_interface(normalized_in
terface, module)\n File
\"/tmp/ansible_BLr8ZB/ansible_module_nxos_interface.py\", line 326, in
get_interface\n attributes = get_manual_interface_attributes(intf,
module)\n File \"/tmp/ansible_BLr8ZB/ansible_module_nxos_interface.py\",
line 248, in get_man
ual_interface_attributes\n except (IndexError, ShellError):\nNameError:
global name 'ShellError' is not defined\n", "module_stdout": "", "msg":
"MODULE FAILURE", "rc": 0}
An exception occurred during task execution. To see the full traceback, use
-vvv. The error was: NameError: global name 'ShellError' is not defined
fatal: [nxos1]: FAILED! => {"changed": false, "failed": true,
"module_stderr": "Traceback (most recent call last):\n File
\"/tmp/ansible_Dwcsun/ansible_module_nxos_interface.py\", line 763, in
<module>\n main()\n File \"/tmp/ansible_Dwcsun/ansible_module_
nxos_interface.py\", line 675, in main\n existing, is_default =
smart_existing(module, intf_type, normalized_interface)\n File
\"/tmp/ansible_Dwcsun/ansible_module_nxos_interface.py\", line 559, in
smart_existing\n existing = get_interface(normalized_in
terface, module)\n File
\"/tmp/ansible_Dwcsun/ansible_module_nxos_interface.py\", line 326, in
get_interface\n attributes = get_manual_interface_attributes(intf,
module)\n File \"/tmp/ansible_Dwcsun/ansible_module_nxos_interface.py\",
line 248, in get_man
ual_interface_attributes\n except (IndexError, ShellError):\nNameError:
global name 'ShellError' is not defined\n", "module_stdout": "", "msg":
"MODULE FAILURE", "rc": 0}
to retry, use: --limit @/vagrant/ansible-nxos/test1.retry
PLAY RECAP
*********************************************************************************************************************************************************************************************************************************************************
nxos1 : ok=0 changed=0 unreachable=0 failed=1
nxos2 : ok=0 changed=0 unreachable=0 failed=1
ubuntu@ubuntu-xenial:/vagrant/ansible-nxos$ ansible --version
ansible 2.3.0.0
config file = /vagrant/ansible-nxos/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0
20160609]
ubuntu@ubuntu-xenial:/vagrant/ansible-nxos$
When I run the same playbook with other interface type (Ethernet, Loopback)
it ends normaly.
Petr
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/641d786d-ceb8-4cb0-b821-b2bb763720e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.