Re: [ansible-project] Proper method of padding text

2014-12-20 Thread Rick Kasten
Thank you. I did read the documentation on truncate, but obviously not closely enough. -- 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+un

Re: [ansible-project] Proper method of padding text

2014-12-20 Thread Matt Martz
You should check out the jinja2 docs: http://jinja.pocoo.org/docs/dev/templates/#truncate truncate will add "..." unless you specify end='' Also you might be able to use the "indent" filter for adding the spacing for you: http://jinja.pocoo.org/docs/dev/templates/#indent On Saturday, December

[ansible-project] Proper method of padding text

2014-12-20 Thread Rick Kasten
I am trying to print a line of text to a file such that field1 is separated from field2 by 16 characters. I have a template like this working: {% for item in collection %} {{ item.name }}{{ "" |truncate(16-(item.name|length)) }}{{ name.value }} {% endfor %} So the " " field is