preloader

Formulas

Overview

Salt Formulas a pre-written states.

The official documentation is available here

How to configure

Salt Formulas are configured as individual Git repositories using GitFS or can be configured manually.

The naming convention is:

$NAME-formula
  • Using GitFS
gitfs_remotes:
  - https://gitlab.com/mahdtech/saltstack/monit-formula
  - https://gitlab.com/mahdtech/saltstack/haproxy-formula
  - https://github.com/saltstack-formulas/memcached-formula
  • Manually
file_roots:
  base:
    - /srv/salt
    - /src/formulas

Usage

Using HAProxy as an example

include:
  - HAProxy

Configure HAProxy:
  pkg.installed:
    - name: haproxy
    - require:
        - pkg: HAProxy

Examples

There are a number of places to find good examples of Salt Formulas including:

Official Formulas

3rd Party Formulas