Env vars in YML - only substituded with OS' ones

Thanks. No, unless I’ve gone blind, temporarily - possible - does not cover my question. Does it?
I’m talking about OS’ env vars, shell variables which in YAML would resolve the their values – again, set in host’s shell (does not exist in .yml)