How to make ansbile output ordered?

15 views
Skip to first unread message

guo tie

unread,
Aug 29, 2017, 1:41:07 AM8/29/17
to Ansible Project

I want ansbile output order as expect:

For example, i hvae a group G with host A,B,C,D, If i use


ansible G -m shell -a uname


I want every time, the output host order is

A
  ...
B
  ...
C
  ...
D
  ...

Uwe Sauter

unread,
Aug 29, 2017, 3:08:34 AM8/29/17
to ansible...@googlegroups.com
Due to the nature of asynchronous execution I don't think there is a way to do what you want to achieve. If you can afford the
time you could serialize your playbooks by putting "serial: 1" on the same level as "hosts". But even then I'm not sure in which
host order Ansible executes the playbook.
> --
> 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-proje...@googlegroups.com
> <mailto:ansible-proje...@googlegroups.com>.
> To post to this group, send email to ansible...@googlegroups.com <mailto:ansible...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/625d27ef-e42a-4994-9314-8c32cc8eef3d%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/625d27ef-e42a-4994-9314-8c32cc8eef3d%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages