Thanks. Feels like what I want to achieve should be possible: fetch from group_vars, override with ENV (for rollback perhaps), default to a branch. I could do it easily in python but we have jinja and yaml
returns an empty string if ENV_VAR is not defined in the environment, but if you use
lookup(‘env’, ‘ENV_VAR’) | default(‘foo’, True)
then if ENV_VAR is not defined (in which case the env lookup plugin returns an empty string), the second parameter to the default filter tells it to treat any falsy value as undefined.