From 37896a18f622fba00812c23075c7be529884cb41 Mon Sep 17 00:00:00 2001 From: Elliot Chen Date: Wed, 19 Jul 2017 14:58:10 -0400 Subject: [PATCH] Added minion scheduler configuration --- salt/files/minion.d/f_defaults.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/salt/files/minion.d/f_defaults.conf b/salt/files/minion.d/f_defaults.conf index c7e59f9b4..3129d24a1 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -370,6 +370,27 @@ mine_functions: # second on the minion scheduler. {{ get_config('loop_interval', '1') }} + +# When using the scheduler at least one schedule needs to be +# defined. The user running the salt master will need read access to the repo. +{% if 'schedule' in cfg_minion -%} +{%- do default_keys.append('schedule') %} +schedule: +{%- for schedule in cfg_minion['schedule'] %} +{%- if schedule is iterable and schedule is not string %} + {%- for name, children in schedule.items() %} + {{ name }}: + {%- for child in children %} + {%- for key, value in child.items() %} + {{ key }}: {{ value }} + {%- endfor -%} + {%- endfor -%} + {%- endfor -%} +{%- endif -%} +{%- endfor -%} +{%- endif %} + + # Some installations choose to start all job returns in a cache or a returner # and forgo sending the results back to a master. In this workflow, jobs # are most often executed with --async from the Salt CLI and then results