top of page

VMware Aria Automation Config: Create Job To Apply Salt State

  • Writer: Taylor Norris
    Taylor Norris
  • Apr 5, 2023
  • 2 min read

You just created your first salt state (great work!). Now you want to create an automated job to apply this salt state to a VM. In this blog post I am going to show you how to create a job to apply a state file in Aria Automation Config (SaltStack Config). If you don't know how to create a state file, see my previous blog "Write Your First Salt State" or view my YouTube video "Create Your First Salt State".

To start out, log into Aria Automation Config (SaltStack Config), click the "Config" drop down, then click "Jobs".


Here we can review jobs that have already been created to run within our environment. You can see the Job Name, Description, Target, Command, and Function that the job will use.

Create Job

To create a job, we can simply click the "Create Job" button.

Name

For name, I will enter "Install NGINX Demo".


Description

In the description box, I will enter a description "This job installs the NGINX application". Descriptions help remind you or other users what this job is doing.


Targets

I will leave targets blank so that we can select our target when we run the job, but targets are the target group of VM's that you want the job to run against.


Function

Under Function, I will select state.apply. This will just apply a state file that I created and saved on the file server.


Environment

I will select base as the environment as this is the environment where my state file is saved.


Select 'POV.application-management.linux.nginx_install

Then I will select the state file that I want to apply which is "myfirstsaltstate.install_nginx".

Finally, I will click save to save this job.


Benefits of Using Jobs

We now have a saved job that can be reused or scheduled as needed. Jobs allow you to setup and schedule repeatable actions for self-service automation, targeting a few or hundreds of VM's, and can employ RBAC so only the correct users have access to run them.

In this blog post we learned how to create a salt job to apply a state file. I hope this post was helpful. Have a great day!



Stay Salty!


Additional Resources








Comments


bottom of page