소스 검색

Merge pull request #323 from aquto/master

Enable option to set minion scheduler
tags/v0.57.0
Niels Abspoel 7 년 전
부모
커밋
c265206e94
2개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. +7
    -0
      pillar.example
  2. +21
    -0
      salt/files/minion.d/f_defaults.conf

+ 7
- 0
pillar.example 파일 보기

@@ -150,6 +150,13 @@ salt:
mine_functions:
network.interface_ip: [eth0]

# Define a minion scheduler
schedule:
- highstate:
- function: state.apply
- minutes: 60
- returner: redis

# other 'non-default' config
auth_keytab: /root/auth.keytab
auth_principal: kadmin/admin

+ 21
- 0
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

Loading…
취소
저장