For the life of me I can’t figure out how to match the right hosts on my playbook like this:
app AND (production OR staging)
I tried “app:&production:staging” but ansible turns that into “(app AND production) OR staging”.
Thinking that AND “:&” binds before OR “:”, I tried this: “app:&production:app:&staging”, which doesn’t match any thing at all.
Ansible has no grouping? So how to solve this trivial issue?
The conditions are not parsed in order (its on my todo list) but
globally, so the position of &production does not currently matter and
it gets applied after all the 'ANDs'.