O'Reilly logo

Learning SaltStack - Second Edition by Colton Myers

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

Chapter 6. The Highstate and Environments

In the preceding chapter, you learned how to use Jinja2 and pillar data to make your state file more flexible.

In this chapter, you will learn how to organize your states so that we can enforce the state of your infrastructure with just a single remote execution command.

You will learn the following:

  • How to use topfiles in the state system to target state files to different minions
  • How to use environments to further organize our state files
  • How to use GitFS to store our state files in version control

The highstate

Until now, we have only been running a single state file at a time using state.sls. However, this doesn't scale very well once we have many state files to manage our entire infrastructure. We want to ...

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