On Wednesday, August 6, 2014 12:02:59 PM UTC-3, Michael DeHaan wrote:
>
> Can you share what a failure means in the above, any output you have, and 
> what ansible version you are running?
>
> Thanks!
>

 Hi Michael,

ansible version is 1.6.3, and below is a sample output.  You will see that 
debug task is being executed only for the vars registered in the second 
shell task.  For failures I was wrong, sorry, there are all "failed=0" in 
this run.

Might be a good addition to the docs that register always store, even when 
tasks are skipped.  I can write a line and send a pull request if you want.
Also, maybe print a warning when the same register is being used more than 
once?

Thanks!

 ______________________
< PLAY [test register under conditionals] >
 ----------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


 _________________
< GATHERING FACTS >
 -----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


ok: [az-123]
ok: [xy-01]
ok: [xy-02]
ok: [az-122]
ok: [xy-03]
 __________________________________
< TASK: shell echo /opt/cache/www/ >
 ----------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


skipping: [az-122]
changed: [xy-01]

cmd:
echo /opt/cache/www/

start:
2014-08-07 08:08:00.679567

end:
2014-08-07 08:08:00.682666

delta:
0:00:00.003099

stdout:
/opt/cache/www/

stderr:

changed: [xy-02]

cmd:
echo /opt/cache/www/

start:
2014-08-07 08:08:01.152222

end:
2014-08-07 08:08:01.155408

delta:
0:00:00.003186

stdout:
/opt/cache/www/

stderr:

skipping: [az-123]
changed: [xy-03]

cmd:
echo /opt/cache/www/

start:
2014-08-07 13:08:02.013062

end:
2014-08-07 13:08:02.015739

delta:
0:00:00.002677

stdout:
/opt/cache/www/

stderr:

 _________________________________
< TASK: shell echo /mnt/code/www/ >
 ---------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


skipping: [xy-03]
skipping: [xy-01]
skipping: [xy-02]
changed: [az-123]

cmd:
echo /mnt/code/www/

start:
2014-08-07 12:08:02.730487

end:
2014-08-07 12:08:02.733503

delta:
0:00:00.003016

stdout:
/mnt/code/www/

stderr:

changed: [az-122]

cmd:
echo /mnt/code/www/

start:
2014-08-07 12:08:03.669314

end:
2014-08-07 12:08:03.673185

delta:
0:00:00.003871

stdout:
/mnt/code/www/

stderr:

 _________________________________
< TASK: debug var=www_data.stdout >
 ---------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


ok: [az-123] => {
    "www_data.stdout": "/mnt/code/www/"
}
skipping: [xy-02]
skipping: [xy-01]
skipping: [xy-03]
ok: [az-122] => {
    "www_data.stdout": "/mnt/code/www/"
}
 ____________
< PLAY RECAP >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


az-123                     : ok=3    changed=1    unreachable=0    failed=0
xy-01                      : ok=2    changed=1    unreachable=0    failed=0
xy-02                      : ok=2    changed=1    unreachable=0    failed=0
xy-03                      : ok=2    changed=1    unreachable=0    failed=0
az-122                     : ok=3    changed=1    unreachable=0    failed=0



-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/015d7d4b-6efb-4873-8c0d-6f14fb2215b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to