Set default environment on minion
Feature request
The minion configuration file currently supports the ability to set the default filesystem environment. This works in cases where saltenv is not sent on the command line. If saltenv is provided in a command line run it will override the minion configuration setting.
The feature request here is to provide an additional parameter that specifies the configured environment can not be overridden.
That sounds fine with me, although the environment would still be logically overwritable since the user calling salt could also change the config. So it would need to be spelled out as a convenience feature.
I am digging a hole for myself, but would you like a way to lock minions into a saltenv from the master?
ZD-945
@thatch45 It's understood that user could change it locally.
What they want to prevent is a user on the master server sending this command
salt '*' state.sls somestatechange saltenv='qa'
and the change is made to a production server that should only be listening for the prod environment.
At this point I think just making this work with manually updating the minions config would be great. I wouldn't dig the hole any deeper than that for now.
Perfect, that should be doable
So long as this is billed as a safety feature and not a security feature, this is fine.
You could always have an saltenv_allow which defaults to * and could be change to "prod" or "qa,dev"
It would be nice if in accepting the keys on the master you could set the saltenv for a minion. i.e. it is sent back in the sign certificate/key.
@meggiebot can you add this to the oxygen release? I don't have access to add tags in the OSS repos. I talked to the customer about this last week and we agreed on Oxygen.