Search code examples
pythonsalt-project

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


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


Solution

  • 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.