preloader

Naming Conventions

Overview

This section includes notes on the naming conventions used for Salt states. The naming conventions are based on the Microsoft Naming Conventions for PowerShell using verb-noun format.

All Salt states need to be unique across the salt configuration.

To make this simpler, a naming convention should be used and each state should perform the bare minimum so that it may be included in other states.

The convention is:

Verb Noun:

The Verb should be from the approved list to make it easier to find and the Noun can be any descriptive name for what you are doing.

Examples:

Install Vim:
Configure HAProxy:
Add User Bob:
Remove User Helen:

Approved Verbs

The list of approved Verbs is as follows:

  • Common Verbs
VerbDescription
InstallVerb used when installing a package or product
ConfigureVerb used when configuring a package or product
AddVerb used when adding a resource
RemoveVerb used when adding a resource
CopyVerb used when copying a resource to a minion
DeleteVerb used when deleting a resource from a minion
CreateVerb used when creating a resource on a minion
  • Connection Verbs
VerbDescription
ConnectVerb used when connecting to a resource
DisconnectVerb used to disconnect from a resource
ReadVerb used when reading from a resource
WriteVerb used when writing to a resource
  • Data Verbs
VerbDescription
BackupVerb used when backing up data
RestoreVerb used when restoring a backup
ConvertVerb used to convert a resource
ConvertFromVerb used to convert from a format
ConvertToVerb used to convert to a format
EditVerb used to edit data
ExportVerb used to export data
ImportVerb used to import data
  • Where possible, jinja variables should be included in the name to ensure that the state is unique.
Install package {{ package_name }}: