The file server is a location for storing both Salt-specific files, such as top files or state files, as well as files that can be distributed to minions, such as system configuration files. In the File Server workspace, you can view, author, and save state files (YAML), modules, and text files.

File Server workspace

Files in SaltStack Config are useful for configuring states you can then apply through jobs. Jobs are used to run remote execution tasks, apply states, and start Salt runners.

Files are also used to iterate over pillar entries in an associated pillar. Pillars are structures of data defined on the Salt master and passed through to one or more minions, using targets. They allow confidential, targeted data to be securely sent only to the relevant minion.

SaltStack Config file server provides the ability to define multiple file environments.

Environments let you isolate files that have the same path and name. By default, files and pillar data exist in the base environment. This is the environment you select when you create a state run job.

You can select the environment in which you want to create a file by specifying it during creation.

In the File Server workspace, you can create new files and clone existing ones. You can also edit and delete files.

Users do not need file server privileges to run jobs. For example, if you create a job that runs the apache/init.sls file (state.applyapache), users with access to this job can run it even though they can’t view, edit, or delete the apache/init.sls file directly.

Only Superusers can view files created by other users. Only the Superuser and Admin default roles are granted access to view and make changes to the file server.

Note: As part of VMware’s initiative to remove problematic terminology, the term Salt master will be replaced with a better term in SaltStack Config and related products and documentation. This terminology update may take a few release cycles before it is fully complete.

To use the File Server workspace, click Config > File Server on the side menu.

Creating a file

To create a new file:

  1. In the File Server workspace, click Create.
  2. Under base, enter the base environment name.
  3. Under Path Name, enter the path to the file, and file name.
    Note: File names do not have to be unique as long as the files are in different paths or environments. This might result in different items displaying with the same name in the SaltStack Config user interface.
  4. Enter the file body and click Save.
  5. (Optional) To clone a file, in the File Server workspace, select the file you want to clone and click Clone.
  6. (Optional) To delete file, select the file, click Delete and then Confirm.