Book Image

Mastering SaltStack

By : Joseph Hall
Book Image

Mastering SaltStack

By: Joseph Hall

Overview of this book

Table of Contents (19 chapters)
Mastering SaltStack
About the Author
About the Reviewers

Incorporating external data sources

We've taken care of Salt keys, but we have some other directories that we need to distribute among the Masters. Let's start with a component that is used every time you issue a command from the Master to one or more Minions: the job cache.

The external job cache

Before we dive into this component, let's review the Master job cache:

  1. When a command is issued, a Job ID (JID) is created on the Master.

  2. Information about that job is stored in the job cache, such as what the command and its arguments are and which Minions will be affected.

  3. The job data is posted to the message queue, where the affected Minions pick it up and perform the requested work.

  4. When each Minion finishes the task, it sends the return data back to the Master where it is also stored in the job cache.

  5. If the salt command is still running, it will pick up the job data and display it to the user.

In this workflow, the Minion will always return data to the Master, whether or not the salt command is...