Why sometimes result of tasks looping over with_items entries are printed in one line and sometimes in multiple lines

15 views
Skip to first unread message

Behrang Saeedzadeh

unread,
Nov 19, 2017, 8:05:01 PM11/19/17
to Ansible Project
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?

Brian Coca

unread,
Nov 20, 2017, 10:36:44 PM11/20/17
to Ansible Project
depends on how you define the loop, I cannot tell you more w/o you
showing the actual tasks.

--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages