To some extent: - I am him :), in the way that indeed I was the one presenting Style Guide with assert being one of the topics
I will modify one of the slides in GitHub - abacusresearch/ansible-style-guide, to have something like “postfactum”…
Honestly it wouldn’t occur to me to write the code like above - like it would sound too complicated to write that (just) for sake having some better message in assert.
But once it is available - I can copy & paste & change
, thank you @kks @vbotka @felixfontein
Along those lines - maybe one of you can modify ansible.builtin.assert module – Asserts given expressions are true — Ansible Community Documentation by adding e.g. one of the examples. On a general note it would be totally cool in case some examples are more “powerful” , especially in case examples start with simpler ones but then provide more complicated ones