22.26.16. Startup States

Sometimes it may be desired that the salt minion execute a state run when it is started. This alleviates the need for the master to initiate a state run on a new minion and can make provisioning much easier.

As of Salt 0.10.3 the minion config reads options that allow for states to be executed at startup. The options are startup_states, sls_list and top_file.

The startup_states option can be passed one of a number of arguments to define how to execute states. The available options are:

highstate
Execute state.highstate
sls
Read in the sls_list option and execute the named sls files
top
Read in the top_file option and execute states based on that top file on the Salt Master

22.26.16.1. Examples:

Execute state.highstate when starting the minion:

startup_states: highstate

Execute the sls files edit.vim and hyper:

startup_states: sls

sls_list:
  - edit.vim
  - hyper

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Table Of Contents

Previous topic

22.26.15. Requisites and Other Global State Arguments

Next topic

22.26.17. State Testing

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.