You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2023. It is now read-only.
I'm using saltenv and pillarenv different from base for my development servers, so every time I'd have to specify saltenv manually, which is rather tedious.
My servers have saltenv in the minion config which means that their default saltenv will be present in __opts__. I don't know if there are other ways to configure default saltenv for a minion.
So the code could look like this:
def render(..., saltenv=None, ...):
"""
docstring
"""
if saltenv is None:
saltenv = __opts__.get('saltenv', 'base')
...
That would work for me. But again, I'm not sure if that's a 100% reliable way to obtain the default saltenv for a minion.
The text was updated successfully, but these errors were encountered:
That's perfectly reasonable. Although you might want to rename the module. debug has a rather high probability of collision with someone else's debug module.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using
saltenv
andpillarenv
different frombase
for my development servers, so every time I'd have to specifysaltenv
manually, which is rather tedious.My servers have
saltenv
in the minion config which means that their defaultsaltenv
will be present in__opts__
. I don't know if there are other ways to configure default saltenv for a minion.So the code could look like this:
That would work for me. But again, I'm not sure if that's a 100% reliable way to obtain the default saltenv for a minion.
The text was updated successfully, but these errors were encountered: