# Debugging a large template file

**URL:** <https://forum.ansible.com/t/debugging-a-large-template-file/15011>\
**Category:** Ansible Project\
**Created:** [April 14, 2014, 2:22pm UTC](https://forum.ansible.com/t/debugging-a-large-template-file/15011 "2014-04-14T14:22:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_Pennypacker](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Bruce\_Pennypacker](https://forum.ansible.com/u/Bruce_Pennypacker)\
**Post date:** [April 14, 2014, 2:22pm UTC](https://forum.ansible.com/t/debugging-a-large-template-file/15011/1 "2014-04-14T14:22:05Z")

</div>

I’m in the process of trying to migrate a rather large (200+ line) configuration file from a homebrew templating system to an ansible template. I have a very simple playbook that just tries to install the template into /tmp so I can do some validation on it. Unfortunately it looks like I didn’t rewrite the template properly using jinja2 since I get an error when I try to run the playbook. And the error I get is rather generic:

TASK: [intl-back | Template test] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [euwprd-back-3-a] =\> {‘msg’: “unsupported operand type(s) for -: ‘unicode’ and ‘str’”, ‘failed’: True}  
fatal: [euwprd-back-3-a] =\> {‘msg’: “unsupported operand type(s) for -: ‘unicode’ and ‘str’”, ‘failed’: True}

Running ansible with -vvvv didn’t offer anything useful either. Is there any way to easily determine what line(s) in the template file these errors are referring to? Or am I just stuck deleting chunks of the template until I figure it out the hard way?

-Bruce
