Chapter 2. Writing Advanced Salt Configurations

In this chapter, you will cover:

  • Writing and retrieving pillar data
  • Using pillar data in states
  • Using grains in states
  • Using conditionals in states and pillars
  • Using Python functions in conditionals
  • Using iterations in states
  • Setting and using variables in states
  • Testing a state run before applying to minions
  • Configuring nodegroups
  • Targeting minions

Introduction

Now that we have gotten our hands dirty with the basics of Salt, in this chapter we are going to dive deep into the advanced configuration of Salt.

One of the notable features of Salt is flexibility, and being based on the dynamic Python language, Salt allows us to incorporate and take advantage of a large number of Python utilities into its configurations. ...

Get Salt Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.