Chapter 5. Expanding Our States with Jinja2 and Pillar

In the previous chapter, you learned about the state system and wrote your first state. In this chapter, we will do the following:

  • Learn the basics of the Jinja2 templating language
  • Use Jinja2 to make our states platform agnostic
  • Learn how to define minion-specific secure data in the pillar system
  • Use Jinja2 to use pillar data in our states

Adding a new minion

The initial examples in this chapter will be all about cross-platform states. To make the examples clearer, we will add a new minion running CentOS 6.5. See Chapter 1, Diving In – Our First Salt Commands, if you need a refresher on how to install salt-minion on a new server. Here's a quick two liner to install a minion using Salt-Bootstrap: ...

Get Learning SaltStack - Second Edition 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.