Learning SaltStack - Second Edition by Colton Myers

Learning SaltStack - Second Edition by Colton Myers

Author:Colton Myers [Myers, Colton]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2016-06-30T04:00:00+00:00


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:

# curl -L https://bootstrap.saltstack.com -o install_salt.sh # sudo sh install_salt.sh



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.