Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require some extra requisites #41130

Closed
ghost opened this issue May 8, 2017 · 2 comments
Closed

Require some extra requisites #41130

ghost opened this issue May 8, 2017 · 2 comments
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. stale
Milestone

Comments

@ghost
Copy link

ghost commented May 8, 2017

Description of Issue/Question

More requisites are needed for proper control

Setup

I have a state file that looks like this:

salt minion installed:
    pkg.installed:
      - name: salt-minion
      - version: "2016.11.4"
      - order: last

reboot if needed:
   system.reboot:
     - require:
         - salt minion installed

In reality the "reboot if needed" state doesn't require the salt minion installed state. I just want it go after. I could add additional "reboot if needed" state with an on_fail requisite but that gets rather messy. What I really want is a way to specify last and second last states. In the way way you can specify first and second with "order: 1" and "order: 2", you should be able to specify final states with order: -1 (equivalent to "order: last") and "order: -2" (the second-last).

In effect I'd like to be able to do as follows:

salt minion installed:
    pkg.installed:
      - name: salt-minion
      - version: "2016.11.4"
      - order: -2

reboot if needed:
   system.reboot:
     - order: -1

Also it might not hurt to have "before" and "after" requisites. "After" should mean that a state comes after and is indifferent to success or failure of the previous state.

@Ch3LL
Copy link
Contributor

Ch3LL commented May 9, 2017

I think this is a sound idea. I'll approve as a feature request. Thanks

@Ch3LL Ch3LL added Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. labels May 9, 2017
@Ch3LL Ch3LL added this to the Approved milestone May 9, 2017
@stale
Copy link

stale bot commented Oct 19, 2018

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.

@stale stale bot added the stale label Oct 19, 2018
@stale stale bot closed this as completed Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. stale
Projects
None yet
Development

No branches or pull requests

1 participant