Browse Source

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

fix: add pool option
tags/v1.2.0
Niels Abspoel 5 years ago
parent
commit
0d904c0c67
No account linked to committer's email address
2 changed files with 15 additions and 2 deletions
  1. +10
    -2
      chrony/files/default/chrony.conf.jinja
  2. +5
    -0
      pillar.example

+ 10
- 2
chrony/files/default/chrony.conf.jinja View File

# Your changes will be overwritten. # Your changes will be overwritten.
######################################################################## ########################################################################


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

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


keyfile {{ chrony.keyfile }} keyfile {{ chrony.keyfile }}


driftfile {{ chrony.driftfile }} driftfile {{ chrony.driftfile }}


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


logdir {{ chrony.logdir }} logdir {{ chrony.logdir }}


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

+ 5
- 0
pillar.example View File

- '1.centos.pool.ntp.org' - '1.centos.pool.ntp.org'
- '2.arch.pool.ntp.org' - '2.arch.pool.ntp.org'
- '3.gentoo.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: allow:
- '10/8' - '10/8'
- '192.168/16' - '192.168/16'

Loading…
Cancel
Save