User Tools

Site Tools


SALT states

Name: SALT states
Description: SALT states: Understanding the whole thing
Modification date :17/10/2018 &
Notify changes to: backops

Quick description

Salt states are a set of:

  • Packages
  • Files
  • Commands
  • Configurations

That will be applied to any machine (minion) so that machine can:

  • perform some set of actions
  • take some pre-configured role


  • Lamp state will install (at a glance):
    • http
    • mariadb
    • php
  • Open firewall ports

States basic knowledge

  • All states MUST be on salt-master folder:

  • states files has *.sls extension.
  • The states has YAML standard syntax.
  • Verify (basic) states syntax (if the state has jinja2 statements will fail):
python -c "from yaml import load, Loader; load(open('STATEFILE.sls'),Loader=Loader)"
linux/salt-stack/salt_states.txt · Last modified: 2022/02/11 11:36 by