Skip to content

[FEATURE REQUEST] Use minion saltenv as the default environment for "source" in modules #58362

Description

@Sxderp

Is your feature request related to a problem? Please describe.
As an example, if running a cmd.script from the command line (salt-call cmd.script ...) the salt environment of the source file must be specified if it is not located in base. This is problematic and can be somewhat confusing when you have saltenv: set in the minion config. It's even more confusing when lock_saltenv: is set as it makes a command that should be invalid, valid:

ex (This is valid even when lock_saltenv is set)
salt-call cmd.script salt://scriptfile saltenv=dev

Describe the solution you'd like

Use the configured environment as the default.


This is probably a pretty big change as "source" is used in a number of locations, but it's pretty annoying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurenew functionality including changes to functionality and code refactors, etc.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions