0
0
mirror of https://github.com/saltstack-formulas/salt-formula.git synced 2025-04-06 12:45:11 +02:00

Merge 3ab819a80767e216074b0298b2854dfe777a04f7 into 570c44b1666d356eac0cf0c7976f221056ead460

This commit is contained in:
kartnico 2024-04-22 20:26:44 +12:00 committed by GitHub
commit 82c8a95b13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View File

@ -161,6 +161,12 @@ salt:
type: runner
cmd: jobs.list_jobs
# Define a master scheduler
schedule:
- update_winrepo:
- function: winrepo.update_git_repos
- hours: 6
# optional: these reactors will be configured on the master
# They override reactors configured in
# 'salt:reactors' or the old 'salt:reactor' parameters

View File

@ -124,6 +124,25 @@ module_dirs:
# job cache and executes the scheduler.
{{ get_config('loop_interval', '60') }}
# 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_master -%}
{%- do default_keys.append('schedule') %}
schedule:
{%- for schedule in cfg_master['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 %}
# Set the default outputter used by the salt command. The default is "nested".
{{ get_config('output', 'nested') }}