Discussion:
[ansible-project] Ansible v2.0 (master branch) not showing each item in with_items
Fotis Gimian
2015-07-26 08:58:19 UTC
Permalink
Hey there guys, hope everyone is well :)

I'm trying to use v2 (current master from GitHub) but, I've come across a
little problem;

e.g. playbook

---
- hosts: localhost
gather_facts: no
tasks:
- shell: /usr/bin/true
with_items:
- hello
- there
- friends

*Ansible 1.9 output*

PLAY [localhost]
**************************************************************


TASK: [shell /usr/bin/true]
***************************************************

changed: [localhost] => (item=hello)

changed: [localhost] => (item=there)

changed: [localhost] => (item=friends)


PLAY RECAP
********************************************************************

localhost : ok=1 changed=1 unreachable=0
failed=0

*Ansible 2.0 (master) output*

PLAY
****************************************************************************


TASK [command]
******************************************************************

changed: [localhost]


PLAY RECAP
**********************************************************************

localhost : ok=1 changed=1 unreachable=0
failed=0


Is there a way to get this additional information back?


Thanks heaps

Fotis
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/05ebc8ac-c2a9-42b0-9c94-b6d4ac961f53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Fotis Gimian
2015-07-28 12:43:11 UTC
Permalink
Apologies to "bump" this folks, but was curious if this is simply the new
behaviour in 2.0 or this is a bug?

Cheers
Fotis
Post by Fotis Gimian
Hey there guys, hope everyone is well :)
I'm trying to use v2 (current master from GitHub) but, I've come across a
little problem;
e.g. playbook
---
- hosts: localhost
gather_facts: no
- shell: /usr/bin/true
- hello
- there
- friends
*Ansible 1.9 output*
PLAY [localhost]
**************************************************************
TASK: [shell /usr/bin/true]
***************************************************
changed: [localhost] => (item=hello)
changed: [localhost] => (item=there)
changed: [localhost] => (item=friends)
PLAY RECAP
********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
*Ansible 2.0 (master) output*
PLAY
****************************************************************************
TASK [command]
******************************************************************
changed: [localhost]
PLAY RECAP
**********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Is there a way to get this additional information back?
Thanks heaps
Fotis
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/33ab7bf7-1ba4-4854-9ca7-91a8eaa1df10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-28 20:33:11 UTC
Permalink
This was just fixed this morning, please try again with current head.
Post by Fotis Gimian
Apologies to "bump" this folks, but was curious if this is simply the new
behaviour in 2.0 or this is a bug?
Cheers
Fotis
Post by Fotis Gimian
Hey there guys, hope everyone is well :)
I'm trying to use v2 (current master from GitHub) but, I've come across a
little problem;
e.g. playbook
---
- hosts: localhost
gather_facts: no
- shell: /usr/bin/true
- hello
- there
- friends
Ansible 1.9 output
PLAY [localhost]
**************************************************************
TASK: [shell /usr/bin/true]
***************************************************
changed: [localhost] => (item=hello)
changed: [localhost] => (item=there)
changed: [localhost] => (item=friends)
PLAY RECAP
********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Ansible 2.0 (master) output
PLAY
****************************************************************************
TASK [command]
******************************************************************
changed: [localhost]
PLAY RECAP
**********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Is there a way to get this additional information back?
Thanks heaps
Fotis
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/33ab7bf7-1ba4-4854-9ca7-91a8eaa1df10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nHBQwH3YUVSMph7UoBsqOwFHmMFQkVPi0BBo26r6Sp_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Fotis Gimian
2015-07-28 22:19:43 UTC
Permalink
Thanks Brian, that seems to be a little better, but the progress is only
displayed at the end of the run while Ansible 1.9.x displayed it
progressively. Is this possible in 2.0?

I recently also had an idea on this same subject. In many cases where the
data structure is large, the output of each item can be rather
overwhelming. What do you think of an idea whereby users may customise the
output of each item in the output.

e.g.

- name: do some stuff
command: ...
item_output: "{{ item.name }} ({{ item.category }})"
with_items:
- name: something
category: something
data1: bla
data2: bla
data3: bla
data4: bla
data5: bla
- name: something 2
category: something 2
data1: bla 2
data2: bla 2
data3: bla 2
data4: bla 2
data5: bla 2

Thanks for all your help
Fotis
Post by Fotis Gimian
Hey there guys, hope everyone is well :)
I'm trying to use v2 (current master from GitHub) but, I've come across a
little problem;
e.g. playbook
---
- hosts: localhost
gather_facts: no
- shell: /usr/bin/true
- hello
- there
- friends
*Ansible 1.9 output*
PLAY [localhost]
**************************************************************
TASK: [shell /usr/bin/true]
***************************************************
changed: [localhost] => (item=hello)
changed: [localhost] => (item=there)
changed: [localhost] => (item=friends)
PLAY RECAP
********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
*Ansible 2.0 (master) output*
PLAY
****************************************************************************
TASK [command]
******************************************************************
changed: [localhost]
PLAY RECAP
**********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Is there a way to get this additional information back?
Thanks heaps
Fotis
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e8d64d0f-9cac-46e0-8a65-fb7f90e11b7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-28 22:23:27 UTC
Permalink
currently output is at the end of the task, we will try to make it per
item but might not be able to do so for 2.0

callback plugins are now much easier to make and use, so you should be
able to change the output to match what you show and customize a
callback easily.
Post by Fotis Gimian
Thanks Brian, that seems to be a little better, but the progress is only
displayed at the end of the run while Ansible 1.9.x displayed it
progressively. Is this possible in 2.0?
I recently also had an idea on this same subject. In many cases where the
data structure is large, the output of each item can be rather overwhelming.
What do you think of an idea whereby users may customise the output of each
item in the output.
e.g.
- name: do some stuff
command: ...
item_output: "{{ item.name }} ({{ item.category }})"
- name: something
category: something
data1: bla
data2: bla
data3: bla
data4: bla
data5: bla
- name: something 2
category: something 2
data1: bla 2
data2: bla 2
data3: bla 2
data4: bla 2
data5: bla 2
Thanks for all your help
Fotis
Post by Fotis Gimian
Hey there guys, hope everyone is well :)
I'm trying to use v2 (current master from GitHub) but, I've come across a
little problem;
e.g. playbook
---
- hosts: localhost
gather_facts: no
- shell: /usr/bin/true
- hello
- there
- friends
Ansible 1.9 output
PLAY [localhost]
**************************************************************
TASK: [shell /usr/bin/true]
***************************************************
changed: [localhost] => (item=hello)
changed: [localhost] => (item=there)
changed: [localhost] => (item=friends)
PLAY RECAP
********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Ansible 2.0 (master) output
PLAY
****************************************************************************
TASK [command]
******************************************************************
changed: [localhost]
PLAY RECAP
**********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Is there a way to get this additional information back?
Thanks heaps
Fotis
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e8d64d0f-9cac-46e0-8a65-fb7f90e11b7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8m329iKhHg1BH-x95%3D%3DcVBAeyDKTEFGhYYVosTV7UvtKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Fotis Gimian
2015-07-29 00:44:28 UTC
Permalink
Progressive output would be greatly appreciated, particularly for longer
tasks.

Thanks for the tip about callbacks, I'll check them out tonight :)

Really appreciate all your help and time!
Fotis
Post by Brian Coca
currently output is at the end of the task, we will try to make it per
item but might not be able to do so for 2.0
callback plugins are now much easier to make and use, so you should be
able to change the output to match what you show and customize a
callback easily.
Post by Fotis Gimian
Thanks Brian, that seems to be a little better, but the progress is only
displayed at the end of the run while Ansible 1.9.x displayed it
progressively. Is this possible in 2.0?
I recently also had an idea on this same subject. In many cases where
the
Post by Fotis Gimian
data structure is large, the output of each item can be rather
overwhelming.
Post by Fotis Gimian
What do you think of an idea whereby users may customise the output of
each
Post by Fotis Gimian
item in the output.
e.g.
- name: do some stuff
command: ...
item_output: "{{ item.name }} ({{ item.category }})"
- name: something
category: something
data1: bla
data2: bla
data3: bla
data4: bla
data5: bla
- name: something 2
category: something 2
data1: bla 2
data2: bla 2
data3: bla 2
data4: bla 2
data5: bla 2
Thanks for all your help
Fotis
Post by Fotis Gimian
Hey there guys, hope everyone is well :)
I'm trying to use v2 (current master from GitHub) but, I've come across
a
Post by Fotis Gimian
Post by Fotis Gimian
little problem;
e.g. playbook
---
- hosts: localhost
gather_facts: no
- shell: /usr/bin/true
- hello
- there
- friends
Ansible 1.9 output
PLAY [localhost]
**************************************************************
TASK: [shell /usr/bin/true]
***************************************************
changed: [localhost] => (item=hello)
changed: [localhost] => (item=there)
changed: [localhost] => (item=friends)
PLAY RECAP
********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Ansible 2.0 (master) output
PLAY
****************************************************************************
Post by Fotis Gimian
Post by Fotis Gimian
TASK [command]
******************************************************************
changed: [localhost]
PLAY RECAP
**********************************************************************
localhost : ok=1 changed=1 unreachable=0
failed=0
Is there a way to get this additional information back?
Thanks heaps
Fotis
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e8d64d0f-9cac-46e0-8a65-fb7f90e11b7e%40googlegroups.com
.
Post by Fotis Gimian
For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKOAcUzntfr7cozqvDKhVPh%2BYU%3DcAJxJW%3D2EASCOCd8jez%2BJXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Fotis Gimian
2015-07-29 10:48:37 UTC
Permalink
After doing a few fresh runs this evening with the newest master branch, I
think that for me personally, the value of items being displayed is lost
unless the output is progressive. In cases where I am installing say 20
packages with a single task, it's impossible to know what's currently
happening or roughly where it's at.

I also noticed displays a blank item at the end of each with_items output
(i.e. one extra line of output).

Would be absolutely awesome if this could be touched up before the beta if
possible. I can't thank you enough for all your dedication and work
towards Ansible, I love it and am beginning to recommend it to our project
teams.

Cheers
Fotis
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4f03390a-337b-4c3d-9978-6d3be4219153%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...