# looping display in local facts

**URL:** <https://forum.ansible.com/t/looping-display-in-local-facts/19698>\
**Category:** Ansible Project\
**Created:** [November 5, 2015, 7:08pm UTC](https://forum.ansible.com/t/looping-display-in-local-facts/19698 "2015-11-05T19:08:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_G](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@Nicolas\_G](https://forum.ansible.com/u/Nicolas_G)\
**Post date:** [November 5, 2015, 7:08pm UTC](https://forum.ansible.com/t/looping-display-in-local-facts/19698/1 "2015-11-05T19:08:41Z")

</div>

Hi,

I have the bellow local fact working :

`

# /etc/ansible/facts.d/monitoring.fact

[tags]  
web=  
db=  
app=

`

In my template I have the bellow jinja code :

`  
{% for facts in ansible\_local.monitoring.tags %}  
{{ facts }}  
{% endfor %}

`

However this is rendering the facts tags like this :

`  
web  
app  
db

`

I would like to have them in the same line like this :  
`  
web app db

`

Is there a new line escape character in Jinja that I can use ?

PS: why doesn’t Ansible display the facts in the correct order they are defined ? **web app db** instead of **web db app**?

Thanks in advance,  
N.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [November 5, 2015, 9:54pm UTC](https://forum.ansible.com/t/looping-display-in-local-facts/19698/2 "2015-11-05T21:54:01Z")

</div>

{{ ' '.join(ansible\_local.monitoring.tags) }}
