Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Sequential operation relatively impossible currently #13657
Due to the requisites system modifying the order of states, it's currently impossible to ensure sequential ordering of states unless you can live without watch/watch_in.
It would be nice if there was a requisite that could be used to trigger states that would always occur at the end of the run and wouldn't re-order the states at all.
We had a good discussion about this. We've come up with the following example. We're thinking of calling it the
So let's consider this simple set of states. We install apache and manage a couple config files.
The listen state can be placed anywhere as many times as needed. So if you want to have something restart half way through, you can put it there, or at the end or wherever.
Also we can restart (or rather, call the mod_watch() function) for multiple states like this:
What are your thoughts on this? Does
As mentioned in IRC, this needs to work in a way where the state can say "these files notify this state" as well as "this state is notified by these files". Kind of like a requisite, but one that doesn't modify ordering.
Otherwise, you may have a large number of sls files that could change and the state referencing files in them would be invalid.
By being able to specify "this file notifies this state" you could even wrap the state in an if that ensures the state exists (formulas, for instance).