The Salt state is used to control the salt command interface. This state is intended for use primarily from the state runner from the master.
The salt.state declaration can call out a highstate or a list of sls:
webservers:
salt.state:
- tgt: 'web*'
- sls:
- apache
- django
- core
- saltenv: prod
databases:
salt.state:
- tgt: role:database
- tgt_type: grain
- highstate: True
Execute a single module function on a remote minion via salt or salt-ssh
Execute a runner module on the master
New in version 2014.7.
Invoke a state run on a given target
Allow multiple state runs to occur at once.
WARNING: This flag is potentially dangerous. It is designed for use when multiple state runs can safely be run at the same Do not use this flag for performance optimization.
Watch Salt's event bus and block until a condition is met
New in version 2014.7.
The following example blocks until all the listed minions complete a restart and reconnect to the Salt master:
reboot_all_minions:
salt.function:
- name: system.reboot
- tgt: '*'
wait_for_reboots:
salt.wait_for_event:
- name: salt/minion/*/start
- id_list:
- jerry
- stuart
- dave
- phil
- kevin
- mike
- require:
- salt: reboot_all_minions
Execute a wheel module on the master
New in version 2014.7.
accept_minion_key:
salt.wheel:
- name: key.accept
- match: frank
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.
22.27.102. salt.states.schedule
Upcoming SaltStack events, webinars and local meet ups and user groups.