"but if I set "ignore_errors: True"

If you ignore errors on a step, that step did not fail, thus the host is
not marked failed.

"and more importantly I would like to get a list of the failed hosts while
playing, not wait until the play has finished.."

not with the CLI.   Ansible Tower 2.0 has some very nice features to show
this in the web interface, but the CLI - it would be difficult to find a
place to put this in.




On Tue, Jun 24, 2014 at 11:10 PM, sturban <[email protected]> wrote:

> Hello,
>
> I am aware that ansible saves a file with hosts that failed to play in
> .ansible/, but if I set "ignore_errors: True" it doesn't seem to do this,
> and more importantly I would like to get a list of the failed hosts while
> playing, not wait until the play has finished... -Is this possible to do?
> Basically I want to identify the hosts that doesn't play due to lack of
> python or other problem so I can initiate provisioning of these.
>
> ---
>
> - hosts: all
>
>   gather_facts: no
>
>   tasks:
>
>   - ping:
>
>     register: result
>
>     ignore_errors: True
>
>
>   - debug: msg="host failed - need to install python"
>
>     register: failhosts
>
>     when: result|failed
>
> Xtratherm Limited is a limited company registered in Ireland. Registered
> number: 331130. Registered office: Kells Road, Navan, Co. Meath. Directors:
> D.E. Hynes, E.J. Hynes, S.K. Steenson, J. Keegan, B. Rafferty, T. Hynes.
> VAT Registration: IE6351130B
> Xtratherm UK Limited is a limited company registered in England and Wales.
> Registered number: 4404208. Registered office: Holmewood Industrial Park,
> Park Road, Chesterfield, Derbyshire S42 5UY. VAT Registration: GB787574856
> Please note that [Xtratherm Limited/Xtratherm UK Limited] may monitor
> e-mail traffic data and content of e-mail for the purpose of security and
> training.
>
> --
> 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/09440aef-9d6d-49f4-9ea2-82150d3369f2%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/09440aef-9d6d-49f4-9ea2-82150d3369f2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgxX%3D8O1fXeSM7pnCtmCfzShQC6JBBJsMkKeGtm3iDB8Tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to