Results 4 comments of Josh

I agree with the original poster that when should be before the module. This aligns more along with programming languages where the conditional is placed before the executed code. I...

One area where ansible's implementation makes this recommendation seem weird is with loops. The when clause is evaluated per item within the loop and therefore the ordering can seem odd....

Would a refactor to modals (https://www.hammerspoon.org/docs/hs.hotkey.modal.html) allow you to support this?