User Tools

Site Tools


linux:salt-stack:salt_states

SALT states

Documentation
Name: SALT states
Description: SALT states: Understanding the whole thing
Modification date :17/10/2018
Owner:warlock86@gmail.com & dodger@ciberterminal.net
Notify changes to: backops
Tags:

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

Example

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

States basic knowledge

  • All states MUST be on salt-master folder:
/srv/salt/base


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