Task Status at Playbook runtime

Hi Folks,

Is there anyway to get specific Task status like Changed, ignored or failed during Playbook runtime in synchronous mode ?

Thanks
Ashish

Hi Folks,

Is there anyway to get specific Task status like Changed, ignored or failed during Playbook runtime in synchronous mode ?

Thanks
Ashish

Sorry, but your question is not clear. Please elaborate and/or illustrate it with an example.

Regards
        Racke

Hi,

Register a variable for the module you call and after test this variable…

More info here :

https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#rc

Example on a change (first link in google) :

https://raymii.org/s/tutorials/Ansible_-_Only-do-something-if-another-action-changed.html

Regards,

Sure, By default, Ansible playbook executes tasks in sequence and summarize task results at last. With this approach, it shows each task status on running playbook verbose logs.

Question is, Is there anyway to get task status like failed, changed etc during playbook runtime (without parsing logs) ? I know this can be achieved in async mode but my requirement is to keep executing task in sequence.

Thanks.