SaltStack Config provides several default targets and jobs along with supporting files and pillar data. Sample job files and pillar data are placed in the sse Salt environment so they don’t interfere with files and pillar data in the base environment. The sample content includes targets, jobs, pillar data, and supporting files.

To test the basic functionality of SaltStack Config, try working with some sample content in the user interface. You may need to install the Salt minion service on a few of the nodes you want to manage before trying the sample content.

Sample job files and pillar data are placed in the sse Salt environment so they don’t interfere with files and pillar data in the base environment. See Environments for more information.

A target is the group of minions, across one or many Salt masters, that a job’s Salt command applies to. A Salt master can also be managed like a minion and can be a target if it is running the minion service. See Minions for more information.

Jobs are used to run remote execution tasks, apply states, and start Salt runners. See Jobs for more information.

Files in SaltStack Config are useful for configuring states you can then apply through jobs. Files are stored in the file server. 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. See File Server for more information.

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. See Pillars for more information.

How to use SaltStack Config samples

Samples are used to save time setting up your SaltStack Config environment. With default jobs, you can take advantage of predefined state files and pillar data to begin running frequently-used operations.

You might also refer to samples as a model for how different system elements are configured to work together as you build your own workflows.

Default targets

SaltStack Config includes a range of default target groups containing all minions of a given operating system. The following default targets are defined by matching the os grain.

  • CentOS
  • Linux
  • MacOS
  • RedHat
  • SUSE
  • Ubuntu
  • Windows
  • Windows Servers

See Minions for more information.

Sample jobs

SaltStack Config provides various state and remote execution jobs. Each is described in further detail below, with a description of related files and pillars where applicable.

Enable Presence

Enables more accurate presence detection. Presence indicates if SaltStack Config has received any job data from the minion recently, within a defined interval. See Minion presence for more information.

Highstate

Runs a state.highstate on targeted minions. A highstate is a state module that applies all states configured in the top.sls file. top.sls must be user-defined and is not included as a sample file. See Jobs for more information.

Sample Apache

files
sse/apache/init.sls
pillar
None

Installs Apache. This state contains logic to determine the correct name of the Apache package based on the target OS.

Sample Disk Usage

Runs the disk.usage command on targeted minions.

Sample DokuWiki

files
sse/dokuwiki/init.sls,sse/dokuwiki/files/*
includes
PHP, Apache
pillar customization
  • dokuwiki_url: sets the URL path where the wiki should appear, default wiki.
  • wiki_title: sets the wiki title, default MyWiki.

Sample HTOP install

files
sse/htop/init.sls
pillar
None

Installs HTOP.

Sample HTOP remove

files
sse/htop/remove.sls
pillar
None

Removes HTOP.

Sample LAMP stack

files
sse/LAMP/init.sls
includes
mySQL, PHP, Apache
pillar customization
  • db_user: default dbuser.
  • db_name: default dbname.
  • db_pass: default password.
  • db_host: default localhost.

Installs Apache, mySQL, and PHP.

Sample mySQL

files
sse/mysql/init.sls
pillar
None

Installs mySQL.

Sample PHP

files
sse/php/init.sls
pillar
None

Installs PHP.

Sample refresh pillar

Refreshes the Salt pillar on targeted minions. Run this after assigning pillar data to minions.

Sample WordPress

files
sse/wordpress/init.sls
pillar
None

Installs WordPress.

test.ping

Runs the test.ping command on targeted minions.