0
In our last post about SaltStack, we introduced the concept of grains. Grains are bits of information that the Salt minion can pull off the system it’s running on. SaltStack also has the concept of pillars. Pillars are sets of data that we can push to the minions and then consume in state or managed files. When you couple this with the ability to template with Jinja, it becomes VERY powerful. Let’s take a quick look at how we can start using pillars and templates.
Prep the Salt Master
The first thing we need to do is to tell Salt that we want to use Pillars. To do this, we just tell the Salt master where the pillar state files are. Let’s edit the salt master config file…
vi /etc/salt/master
Now find the ‘Pillar Settings’ section and uncomment the line I have highlighted in red below…
Then restart the salt-master service…
systemctl restart salt-master
So we just told Salt that it should use the ‘/srv/pillar/’ directory for pillar info so we need to now go and create it…
mkdir /srv/pillar/
Now we’re all set. Pillar information is exported to the Continue reading