ioc_template Module Failure

9 views
Skip to first unread message

Shubham Gampawar

unread,
Jan 6, 2017, 9:21:50 AM1/6/17
to Ansible Project, nar...@criterionnetworks.com
Hello,

     I am using Ansible 2.2 to automate Cisco 2800 router in that I am generating configurations using Jinja2 templates.It is generating configuration file to respective destination folder. when pushing that configurations to my router I am getting following error:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: cnlabs(config)#
fatal: [192.168.3.65]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_HV_5qu/ansible_module_ios_template.py\", line 174, in <module>\n    main()\n  File \"/tmp/ansible_HV_5qu/ansible_module_ios_template.py\", line 165, in main\n    response = module.config(commands)\n  File \"/tmp/ansible_HV_5qu/ansible_modlib.zip/ansible/module_utils/netcfg.py\", line 54, in __call__\n  File \"/tmp/ansible_HV_5qu/ansible_modlib.zip/ansible/module_utils/ios.py\", line 194, in configure\n  File \"/tmp/ansible_HV_5qu/ansible_modlib.zip/ansible/module_utils/shell.py\", line 250, in execute\nansible.module_utils.network.NetworkError: matched error in response: configure terminal\r\n                     ^\r\n% Invalid input detected at '^' marker.\r\n\r\ncnlabs(config)#\n", "module_stdout": "", "msg": "MODULE FAILURE"}
    

This are the configurations which are generated in my shubham.j2 file

configure terminal
interface fastEthernet 0/0
ip address 1.1.1.1 255.255.255.0
no shutdown
exit

here I am trying to push the above IP Address to FastEthernet 0/0 port of my cisco 2800 router. Is that error is because of module failure ?, Can anyone help me to resolve this error .
Reply all
Reply to author
Forward
0 new messages