O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding and configuring Salt pillars

In this recipe, we will learn about pillars, how they fit into the Salt architecture, and how to configure them. We will create pillar data for a user state, which we will configure later using this pillar data.

How to do it...

We will create pillar data for the development environment.

  1. First, we will create a directory for the name of the pillar data (usually it is named the same as the state we are configuring this pillar for, that is, if we are configuring this pillar for the user state, we will name this pillar directory user:
    [root@salt-master ~]# mkdir \
    /opt/salt-cookbook/pillar/development/user
    
    [root@salt-master ~]# touch \
    /opt/salt-cookbook/pillar/development/user/init.sls
    
  2. Edit /opt/salt-cookbook/salt/pillar/development/user/init.sls ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required