瀏覽代碼

fix: add pool option

tags/v1.2.0
kkeane 5 年之前
父節點
當前提交
90cdeeab34
共有 2 個文件被更改,包括 15 次插入2 次删除
  1. +10
    -2
      chrony/files/default/chrony.conf.jinja
  2. +5
    -0
      pillar.example

+ 10
- 2
chrony/files/default/chrony.conf.jinja 查看文件

@@ -3,22 +3,30 @@
# Your changes will be overwritten.
########################################################################

{%- if chrony.ntpservers is defined %}
{% for server in chrony.ntpservers -%}
server {{ server }} {{ chrony.options }}
{% endfor %}
{%- endif %}

{%- if chrony.pool is defined %}
{% for pool in chrony.pool -%}
pool {{ pool }} {{ chrony.options }}
{% endfor %}
{% endif %}

keyfile {{ chrony.keyfile }}

driftfile {{ chrony.driftfile }}

{% if chrony.allow is defined %}
{% for allowed in chrony.get('allow', []) -%}
{% for allowed in chrony.get('allow', {}) -%}
allow {{ allowed }}
{% endfor %}
{%- endif %}

logdir {{ chrony.logdir }}

{% for param in chrony.get('otherparams', []) -%}
{% for param in chrony.get('otherparams', {}) -%}
{{ param }}
{% endfor %}

+ 5
- 0
pillar.example 查看文件

@@ -4,6 +4,11 @@ chrony:
- '1.centos.pool.ntp.org'
- '2.arch.pool.ntp.org'
- '3.gentoo.pool.ntp.org'
pool:
- '0.debian.pool.ntp.org'
- '1.centos.pool.ntp.org'
- '2.arch.pool.ntp.org'
- '3.gentoo.pool.ntp.org'
allow:
- '10/8'
- '192.168/16'

Loading…
取消
儲存