-
Notifications
You must be signed in to change notification settings - Fork 0
04. SaltStack files structure
The salt-master is configured via the master configuration file
The configuration file for the salt-master is located at /etc/salt/master
by default.
Documentation: https://docs.saltstack.com/en/latest/ref/configuration/master.html
Salt runs a file server to deliver files to minions.
This file server is built into the master daemon and does not require a dedicated port.
Default location is /srv/salt
.
Configured via the file_roots
option inside the master configuration file.
Example:
file_roots:
base:
- /srv/salt
The default location for the pillar is in /srv/pillar
.
The pillar location can be configured via the pillar_roots
option inside the master configuration file.
sls files.
the pillar has a top file.
Example:
pillar_roots:
base:
- /srv/pillar
SLS (SaLt State) files.
yaml format.
representation/description of the state in which a system should be in.
kind of ansible playbooks.
Salt runners work similarly to Salt execution modules however they execute on the Salt master itself instead of remote Salt minions.
you can execute runners with salt-run
command.
You can set additional directories to search for runner modules with runner_dirs
in the master configuration file.
Examples:
runner_dirs:
- /srv/runners/
Reactor sls files should be placed in the /srv/reactor/
directory for consistency between environments, but this is not currently enforced by Salt.
Reactor sls files follow a similar format to other sls files in Salt.
They are written in YAML and can be templated using Jinja.
Example:
reactor:
- 'jnpr/syslog/*/UI_COMMIT_COMPLETED':
- /srv/reactor/on_commit.sls
Reactor sls files are mapped to event in the section reactor
of the master conf file /etc/salt/master
or /etc/salt/master.d/reactor.conf
support for salt://
file paths.
Example:
reactor:
- 'jnpr/syslog/*/UI_COMMIT_COMPLETED':
- /srv/reactor/on_commit.sls
engines_dirs
option in the Salt master or in the Salt minion configuration file has the list of directories under which Salt attempts to find Salt engines.
Example:
engines_dirs:
- /srv/engines
the salt-minion is configured via the minion configuration file.
By default, the salt-minion configuration will be in /etc/salt/minion
.
engines_dirs
option in the Salt master or in the Salt minion configuration file has the list of directories under which Salt attempts to find Salt engines.
Example:
engines_dirs:
- /srv/engines
Proxy minions can now be configured in /etc/salt/proxy
or /etc/salt/proxy.d
instead of just pillar.
Configuration format is the same as it would be in pillar.