Need help to understand the output of ansible-playbook

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

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