Need help to understand the output of ansible-playbook

1,165 views
Skip to first unread message

niraj pandey

unread,
Nov 17, 2016, 2:49:18 AM11/17/16
to Ansible Development
Hi ,

Can someone please explain me this output format (what is ok , changed ,unrechable ,failed and it's values meanings)?
Thanks in advance.

 ansible-playbook  uptime.yaml  -e "hosts=all"



PLAY RECAP ******************************************************************************************************************************************************************
abc                : ok=0    changed=0    unreachable=0    failed=1
def                 : ok=0    changed=0    unreachable=1    failed=0
ghi                 : ok=3    changed=1    unreachable=0    failed=0



uptime.yaml:


- hosts: '{{ hosts }}'

  #remote_user: root
  tasks:
    - name: Collecting uptime On Group of Hosts
      shell: uptime
      register: look
    - debug: var=look.stdout_lines

Regards
Niraj

Brian Coca

unread,
Nov 17, 2016, 3:21:40 PM11/17/16
to niraj pandey, Ansible Development
you have 3 tasks, the 2 you defined and the implied 'fact gathering'.

host abc fact gathering fails so it is removed from play and you get 1 count of failed
host def is unreachable for fact gathering so you get 1 unreachable count
ghi works for all 3 tasks, shell always returns changed, so you get 3 OK, one of them also changed


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