# An exception occurred during task execution  in  ansible playbook

**URL:** <https://forum.ansible.com/t/an-exception-occurred-during-task-execution-in-ansible-playbook/25233>\
**Category:** Ansible Developer\
**Created:** [August 11, 2017, 11:44am UTC](https://forum.ansible.com/t/an-exception-occurred-during-task-execution-in-ansible-playbook/25233 "2017-08-11T11:44:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samya\_Ghosh](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@Samya\_Ghosh](https://forum.ansible.com/u/Samya_Ghosh)\
**Post date:** [August 11, 2017, 11:44am UTC](https://forum.ansible.com/t/an-exception-occurred-during-task-execution-in-ansible-playbook/25233/1 "2017-08-11T11:44:10Z")

</div>

Dear all,

I am geting an error during my playbook running .

i am using ntc-ansible and I want to send command from a text file in a Network for routing configuration

code is like this with ntc ansible

---

<div class="post-metadata">

**Author:** ![alikins](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@alikins](https://forum.ansible.com/u/alikins)\
**Post date:** [August 11, 2017, 3:41pm UTC](https://forum.ansible.com/t/an-exception-occurred-during-task-execution-in-ansible-playbook/25233/2 "2017-08-11T15:41:38Z")

</div>

That looks like a bug in a module thats not in ansible/ansible but in [https://github.com/networktocode/ntc-ansible/blob/master/library/ntc\_config\_command.py#L244](https://github.com/networktocode/ntc-ansible/blob/master/library/ntc_config_command.py#L244)

(More specifically, like the error references, the ‘output’ var there isn’t defined there. Looks like either a indent/scope issue, or just a missing

default for ‘output’)

Should file an issue for their ntc\_config\_command module in their issue tracker at their github repo: [https://github.com/networktocode/ntc-ansible/issues](https://github.com/networktocode/ntc-ansible/issues)
