What's the difference between state.sls and state.apply?

Question:

What’s the difference between state.apply and state.sls? When should I use state.apply vs state.sls?

Asked By: aedry

||

Answers:

state.sls <state_file> will execute the states in a specific file.

state.highstate will execute the highstate configured by top.sls

state.apply will do a state.highstate if no arguments are given and a state.sls <state_file> when a argument is given.

You can look at state.apply as an easy way of using states command.

Answered By: Gijs Brandsma
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.