saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
13.98k stars 5.47k forks source link

[DOCS] state_top_saltenv documention is inaccurate in regard to when it applies #66587

Open Sxderp opened 1 month ago

Sxderp commented 1 month ago

Description

This option has no default value. Set it to an environment name to ensure that only the top file from that environment is considered during a highstate.

The docs here are wrong. The "ensure that only the top file from that environment is considered" is only applicable if saltenv is not specified by the minion.

https://github.com/saltstack/salt/blob/29b6843268e9877c28bd283b0aa9d77e4bae948d/salt/state.py#L3892-L3920

Suggested Fix Update the docs to indicate that it will only apply if the minion does not have a saltenv configured. I believe this setting is more accurately described as a saltenv fallback, as it behaves very similar to if saltenv was configured.

Location or format of documentation https://docs.saltproject.io/en/latest/ref/configuration/master.html#state-top-saltenv https://docs.saltproject.io/en/latest/ref/configuration/minion.html#state-top-saltenv

Additional context I actually like the way the option currently works. I do /not/ believe it should be changed.