Closed QuinnyPig closed 11 years ago
We decided a long time ago not to do magic requisites, and that salt would stay explicit. The idea being that when managing a system you don't want magic happening. I would add a order: 1 to the state that installs the ruby deps or make the gem states require the ruby deps (I thought you were anti install via anything other than packages....)
(You're right-- I am vehemently anti-install for anything outside of packages, but the Ruby community is not. Ergo, it's one of those "we can be right, or we can be happy/employed" situations, unfortunately. See my work with UtahDave on the rvm module for more ranting on this subject...)
I'm fine with require statements or order statements, and I agree with you that magic should be kept to a minimum-- but if I read http://docs.saltstack.com/ref/states/all/salt.states.gem.html correctly, there's no require argument to the gem state; is this implicit in all states? If so, where is this documented, as I think there are likely other "global" state arguments that would come in extremely handy...
So it looks like this is a doc bug rather than a code bug, which is easier to fix!
Yes, require applies to all states, it does not need to be implimented on a per state basis as it is handled entirely in the compiler. all requisites are this way (require, require_in, watch, watch_in, use, use_in) Also the order arg is global and the names arg is global. If this needs to be clarified it should be clarified in the tutorials and the requisite doc: http://docs.saltstack.com/ref/states/requisites.html
Looks like we got this resolved. Closing.
Using the gem state works well provided that the ruby deps are installed; without explicit ordering, I find that on first highstate, gems are attempting install before ruby, which obviously breaks.