瀏覽代碼

Merge pull request #19 from kjkeane/update-ntp-pool

fix: add pool option
tags/v1.2.0
Niels Abspoel 5 年之前
父節點
當前提交
0d904c0c67
沒有連結到貢獻者的電子郵件帳戶。
共有 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 查看文件

@@ -7,6 +7,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…
取消
儲存