SoCruel.NU

The domain that loves BSD

Home About Me Archive Contact

How to configure a Salt master on FreeBSD

The post How to install Saltstack on FreeBSD discusses the basics of Saltstack on FreeBSD. This post continues on this and describes how the Salt master role is setup on a FreeBSD system.

Requirements

The following requirements have to be in place to be able to implement what is described in this post:

Setting up a Salt master

The first step in setting up a Salt master is to provision a Salt master configuration file. The name of this configuration file is master and resides in the directory /usr/local/etc/salt. The Salt installation provides a master.sample file with all the knobs and options. But to start with this is all to much. The contents of our Salt master configuration file are:

file_roots:
  base:
    - /usr/local/etc/salt/states

pillar_roots:
  base:
    - /usr/local/etc/salt/pillar

What does this all mean?

  • the directory /usr/local/etc/salt/states is used to store the Salt states
  • the directory /usr/local/etc/salt/pillar is used to store the Salt pillar

The next step is to make sure that the Salt master processes can be started:

# sysrc salt_master_enable="YES"

and then start them

# service salt_master start

Results

With the above all done we have some Salt master processes running:

# ps ax | grep salt-master | grep -v grep

and we have the Salt master process listening on TCP ports 4505 and 4506:

# sockstat -4 | grep python2.7

Resources

Some (other) resources about this subject:

Updated: October 4, 2018