2012-11-09 18:24:00 +00:00
|
|
|
===============================================
|
|
|
|
Using cron with Salt
|
|
|
|
===============================================
|
|
|
|
|
2012-11-09 19:25:14 +00:00
|
|
|
The Salt Minion can initiate its own highstate using the `salt-call` command.
|
2012-11-09 18:24:00 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
2012-11-09 19:15:15 +00:00
|
|
|
|
2012-11-09 18:24:00 +00:00
|
|
|
$ salt-call state.highstate
|
|
|
|
|
|
|
|
|
|
|
|
This will cause the minion to check in with the master and ensure it is in the
|
|
|
|
correct 'state'.
|
|
|
|
|
|
|
|
|
|
|
|
Use cron to initiate a highstate
|
|
|
|
================================
|
|
|
|
|
|
|
|
If you would like the Salt Minion to regularly check in with the master you can
|
2012-11-09 19:25:14 +00:00
|
|
|
use the venerable cron to run the `salt-call` command.
|
2012-11-09 18:24:00 +00:00
|
|
|
|
2012-11-09 19:15:15 +00:00
|
|
|
.. code-block:: bash
|
2012-11-09 18:24:00 +00:00
|
|
|
|
2012-11-09 19:06:35 +00:00
|
|
|
# PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
|
|
|
|
|
|
00 00 * * * salt-call state.highstate
|
|
|
|
|
2012-11-09 19:25:14 +00:00
|
|
|
The above cron entry will run a highstate every day at midnight.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
Be aware that you may need to ensure the PATH for cron includes any
|
|
|
|
scripts or commands that need to be executed.
|