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.
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
When I run the same playbook with other interface type (Ethernet, Loopback) it ends normaly.