You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your highly useful and highly readable book on Ansible. I have dog-eared my copy extensively!
In Chapter 11 there is a section named "The fail and assert modules".
It currently says:
Both fail and assert, when triggered, will abort the playbook
run, and the only difference is in the simplicity of their usage.
I humbly suggest amending that to something like:
Both fail and assert, when triggered, will abort the playbook
run. The choice between these two is one of style and simplicity.
One subtle difference is that a 'fail' task will be reported as
'skipped' in the final recap statistics when the failure is not
triggered.
If your playbook contains a single 'fail' task that is happily
not triggered, the playbook results will contain:
PLAY RECAP *********************************************************************
default : .......(snip).... skipped=1
If your playbook instead contains a single 'assert' task that is
happily not triggered, you will see "skipped=0" and the
individual task outcome will be:
TASK [my_assert] ****************************************
ok: [default] => {
"changed": false,
"msg": "All assertions passed"
}
This subtlety about "skipped" task count can be relevant in scenarios where one must audit and justify tasks that have been skipped.
The text was updated successfully, but these errors were encountered:
geerlingguy
changed the title
Small suggestion for Chapter 11 fail/assert remarks (in response to "help improve this book")
Small suggestion for Chapter 11 fail/assert remarks
Dec 31, 2019
Thank you for your highly useful and highly readable book on Ansible. I have dog-eared my copy extensively!
In Chapter 11 there is a section named "The fail and assert modules".
It currently says:
I humbly suggest amending that to something like:
This subtlety about "skipped" task count can be relevant in scenarios where one must audit and justify tasks that have been skipped.
The text was updated successfully, but these errors were encountered: