Skip to content

state.top does not take/obey saltenv argument #10660

Closed

Description

@basepi

We need to make state.top take a saltenv argument which will limit the search to only that environment. This allows state.top to be used to trigger a versioned highstate from a given branch in gitfs, for example, without having to have a different name for the topfile in each branch.

Activity

  1. added this to the milestone on Feb 21, 2014
  2. alex-solidfire commented on Sep 30, 2014

    @alex-solidfire

    I was about to open a new issue about state.highstate and saltenv. Could you add this also please?

  3. basepi commented on Oct 1, 2014

    @basepi
    ContributorAuthor

    Probably will be similar code. Thanks for finding this issue and posting here. =)

  4. somenick commented on Jan 27, 2015

    @somenick

    Based on the source state.highstate does accept (and has for a while: #4474) a saltenv kwarg that's undocumented, and seems to point to a very simple similar solution for state.top as well as a possible workaround: set 'environment' in the minion config.

    Another workaround might be the obscure - but documented - 'localconfig' param.

    It is a bit confusing because http://docs.saltstack.com/en/latest/ref/configuration/minion.html#environment explicitly mentions the top file for something it can't be used for: defining the environments is indeed best done in top files, but picking the environment can only be (officially) done in the minion config since saltenv doesn't work/is undocumented for the two methods that actually use them.

    maybe this should be reclassified as a low hanging fruit bug...

  5. alex-solidfire commented on Jan 27, 2015

    @alex-solidfire

    Thanks @somenick . We will give this a shot.

  6. stale commented on Oct 2, 2017

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

    If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurestale

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions