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 20, 2014, Rick Kasten <[email protected]> wrote:

> Furthermore, I can show that it is the 'truncate' part itself that is
> adding the '...':
>
> {% for item in collection %}
> {{ item.name }}{{ "                " |truncate(16-(item.name|length))
> }}:{{ name.value }}
> {% endfor %}
>
> Produces the following output:
>
> item1           ...:v01
> item02          ...:v2
> the_15-chr_item ...:v03
> item0004        ...:v04
>
> --
> 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 [email protected]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/e194803b-537d-4421-a3e5-3a005aeceb12%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e194803b-537d-4421-a3e5-3a005aeceb12%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v9_i5NJ6jG_xKPV6DBBfwqteRp-nD_d66Xe-_R%3DhUaTWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to