How to get rid of unnecessary data displayed on the screen ?

55 views
Skip to first unread message

P

unread,
Jun 9, 2015, 6:11:00 AM6/9/15
to ansible...@googlegroups.com
Hi all,

I have just updated our ansible to 1.9.1.
It turned out that when I run it, i.e:

ansible-playbook -i hosts some.yml --list-hosts --list-tasks

I also get the following data on the screen:

 play #1 (group.main): host count=2
    server1
   
server2
  play #1 (group.main):    TAGS: []
    role1 - task1 ...
    role1 - task2 ...

  play
#2 (group1) host count=0
  play
#2 (group1):    TAGS: []

  play
#3 (group2): host count=0
  play
#3 (group2):     TAGS: []

  play
#4 (group4): host count=0
  play
#4 (group4):        TAGS: []
    role1
- task1
    role1 - task2

   
role1 - task3

  play #5 (group5): host count=0
  play
#5 (group5):    TAGS: []

  play
#6 (group6): host count=0
  play
#6 (group6):        TAGS: []



It seems that ansible is telling me also about things which will not be done.
Is is possible to display only what is going to be done ?
And not the others ?

Best regards

Brian Coca

unread,
Jun 9, 2015, 8:51:34 AM6/9/15
to ansible...@googlegroups.com
I'm not sure what you are asking, it is just listing tasks, there is
no qualifier that shows what will or will not be run. Also note that
only list hosts or list tasks works, cannot use both at same time.
> --
> 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.
> 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/4dce5b58-2361-4552-ab88-be8eefaa4f34%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

P

unread,
Jun 10, 2015, 3:37:13 AM6/10/15
to ansible...@googlegroups.com
When you have a look at play #2, #3, #4, #5, #6 it is displayed on the screen but
since there are no servers there it means they are not to be done.
What I am trying to say is that in ansible 1.8 they didn't appear on the screen (!)
1.8 version would show (AFAIR ...) only play #1.
When number of hosts and roles to be applied do server are growing (like in our case)
those unnecessary "empty" plays (#2, #3, ... ) mess up with the screen
and you have to scroll and analyse the output "what is being applied" ?

By the way: in 1.8 we always used --list-hosts and --list-tasks together and it worked
like a charm. Has it changed in 1.9 ?

P

unread,
Jun 16, 2015, 4:17:05 AM6/16/15
to ansible...@googlegroups.com
Any suggestion / recommendation / help ?
Reply all
Reply to author
Forward
0 new messages