Debugging a large template file

24 views
Skip to first unread message

Bruce Pennypacker

unread,
Apr 14, 2014, 10:22:05 AM4/14/14
to ansible...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages