You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I think this is a sound idea. I'll approve as a feature request. Thanks
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
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.
Description of Issue/Question
More requisites are needed for proper control
Setup
I have a state file that looks like this:
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:
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.
The text was updated successfully, but these errors were encountered: