I've run into some issues using nxos_reboot module in 2.2.0.0. Given a very simple playbook:
--- - name: Reboot TOR B hosts: test_b gather_facts: no connection: local vars: ansible_python_interpreter: /glide/bin/python27 cli: host: "{{ inventory_hostname }}" tasks: - name: Rebooting nxos_reboot: provider: "{{ cli }}" confirm: true I get the following python exception: TASK [Rebooting] *************************************************************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnboundLocalError: local variable 'body' referenced before assignment fatal: [asw-004b.sea3.service-now.com]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_tvr_so/ansible_module_nxos_reboot.py\", line 297, in <module>\n main()\n File \"/tmp/ansible_tvr_so/ansible_module_nxos_reboot.py\", line 284, in main\n reboot(module)\n File \"/tmp/ansible_tvr_so/ansible_module_nxos_reboot.py\", line 217, in reboot\n disable_confirmation(module)\n File \"/tmp/ansible_tvr_so/ansible_module_nxos_reboot.py\", line 263, in disable_confirmation\n body = execute_show_command(command, module, command_type='cli_show_ascii')[0]\n File \"/tmp/ansible_tvr_so/ansible_module_nxos_reboot.py\", line 258, in execute_show_command\n return body\nUnboundLocalError: local variable 'body' referenced before assignment\n", "module_stdout": "", "msg": "MODULE FAILURE"} I've noticed the same error when using nxos_install_os. Has anybody had success using these new modules? -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/43657d13-c602-48c8-9419-46269342dc69%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.