Learn SaltStack Config

Learn SaltStack Config

Part of VMware vRealize Automation

Jobs

Overview

Jobs are used to run remote executions and state files against minions. From the jobs section you can create, configure, save jobs that can be re-run and reused. For example you could have a job that configures a firewall settings on a Linux minion and installs some applications, this job could be run every time a machine is deployed to ensure the same set of applications are installed.

This is also one of the areas of the product where you can run a job and identify a Target group of minions to run the job against. Lets look a bit more on how to create a job.

Create a Job

When you go into the jobs section you can create jobs by clicking the Create Job button. You can define the job settings with the following options:

Name - Enter a name for the job
Description - Enter a description (optional)
Command - choose from the following two options:

salt: define a job to run on a target group of minion(s)

salt-run: define a job to run on a Salt master or group of Salt masters


Targets- choose a target group of minions to run the job against. This is optional and may be used only if you know which minions you want the job to run against. If you are planning to run this job against random minions in the future then you can leave this blank then run the job against a particular minion in the Minions section.
Function- enter a function to define what the job will do. An example could be state.apply which would run a state file when the job is exectuted.
Arguments - some functions will require arguments. For example the function cmd.run would require arguments to define the command you want to run on the minion.

Last updated on 17 Aug 2021
 Edit on GitHub