Salt stack job scheduling

The scheduling system exposes the execution of any execution function on minions or any runner on the master.

It is performed by the following methods

*Schedule − The schedule option in either the master or the minion config files.

*Minion pillar data − It refreshes the minion pillar data using the saltutil.refesh_pillar command.

*The schedule state or schedule module.

Salt states are executed on the minion. we can pass the positional arguments and provide a YAML dict of the named arguments in the config file as shown below

schedule:

   job1:

      function: saltstate.sls

      seconds: 3600

      args:

         - httpd

      kwargs:

         test: True

 Here, job1 will execute the function saltstate.sls with the specified arguments, httpd for every hour. The test: True is the additional argument for the httpd command that is defined in saltstate. sls.


Relevant Blogs:

Salt Stack Installation 

Salt stack execution module 

Migrating a Windows Azure Virtual Machine (VM) to AWS

Salt stack using cron

Recent Comments

No comments

Leave a Comment