# Why sometimes result of tasks looping over with\_items entries are printed in one line and sometimes in multiple lines

**URL:** <https://forum.ansible.com/t/why-sometimes-result-of-tasks-looping-over-with-items-entries-are-printed-in-one-line-and-sometimes-in-multiple-lines/26075>\
**Category:** Ansible Project\
**Created:** [November 20, 2017, 1:05am UTC](https://forum.ansible.com/t/why-sometimes-result-of-tasks-looping-over-with-items-entries-are-printed-in-one-line-and-sometimes-in-multiple-lines/26075 "2017-11-20T01:05:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Behrang](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Behrang](https://forum.ansible.com/u/Behrang)\
**Post date:** [November 20, 2017, 1:05am UTC](https://forum.ansible.com/t/why-sometimes-result-of-tasks-looping-over-with-items-entries-are-printed-in-one-line-and-sometimes-in-multiple-lines/26075/1 "2017-11-20T01:05:00Z")

</div>

For example:

`  
TASK [hal9000 : Install packages] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [localhost] =\> (item=[u’python-lxml’, u’jdk1.8.0\_92’])

TASK [hal9000 : Copy configurations] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [localhost] =\> (item=a)  
ok: [localhost] =\> (item=b)  
ok: [localhost] =\> (item=c)  
ok: [localhost] =\> (item=d)  
`

The only difference is that for the first task, the items are static values but for the second task they are stored in a variable.

But why is Ansible treating them different?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 21, 2017, 3:36am UTC](https://forum.ansible.com/t/why-sometimes-result-of-tasks-looping-over-with-items-entries-are-printed-in-one-line-and-sometimes-in-multiple-lines/26075/2 "2017-11-21T03:36:26Z")

</div>

depends on how you define the loop, I cannot tell you more w/o you  
showing the actual tasks.
