How Salt uses files
There are two ways that Salt's built-in file server uses files when communicating with Minions. They can be served whole and intact, or they can be processed by a templating engine, using a renderer module as discussed in Chapter 5, Rendering Data.
In either case, these files are stored in one or more sets of directories, as configured with the file_roots
directive in the master configuration file. These directories are grouped by environment. When Salt is looking for a file, it will search through the directories in the order in which they are listed. The default environment, base
, normally uses /srv/salt/
to store files. Such a configuration would look like:
file_roots: base: - /srv/salt/
What many users don't realize is that the file_roots
directive is actually a configuration option that is specific to a file server module called roots
. This module, along with all other file server modules, is configured using the fileserver_backend
directive:
fileserver_backend...