diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-02-08 02:27:20 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-02-08 02:27:20 +0100 |
commit | 58bf20f8a6709f2ea75f95659c0211c1aff7c7b3 (patch) | |
tree | 8f6a6bc7473ae285c7981c10b44a79b30b1e40e5 /roles/chrony/templates | |
parent | ele-helene|dione: installer net config (diff) |
added chrony role
Diffstat (limited to 'roles/chrony/templates')
-rw-r--r-- | roles/chrony/templates/chrony.conf.j2 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/roles/chrony/templates/chrony.conf.j2 b/roles/chrony/templates/chrony.conf.j2 new file mode 100644 index 00000000..62d45315 --- /dev/null +++ b/roles/chrony/templates/chrony.conf.j2 @@ -0,0 +1,55 @@ +### Global options + +cmdport 0 +keyfile /etc/chrony/chrony.keys +driftfile /var/lib/chrony/chrony.drift +logdir /var/log/chrony +maxupdateskew 100.0 +rtcsync +makestep 1 3 + +{% if chrony_hwtimestamp_interfaces is defined %} +{% for interface in chrony_hwtimestamp_interfaces %} +hwtimestamp {{ interface.name }}{% if 'options' in interface %} {{ interface.options }}{% endif %}{{ '' }} +{% endfor %} + +{% endif %} + +### Sources + +{% if chrony_source_servers is defined %} +{% for server in chrony_source_servers %} +server {{ server.name }}{% if 'options' in server %} {{ server.options }}{% endif %}{{ '' }} +{% endfor %} + +{% endif %} +{% if chrony_source_pools is defined %} +{% for pool in chrony_source_pools %} +pool {{ pool.name }}{% if 'options' in pool %} {{ pool.options }}{% endif %}{{ '' }} +{% endfor %} + +{% endif %} +{% if chrony_source_peers is defined %} +{% for peer in chrony_source_peers %} +peer {{ peer.name }}{% if 'options' in peer %} {{ peer.options }}{% endif %}{{ '' }} +{% endfor %} + +{% endif %} + + +{% if chrony_server is defined %} +### Server + +{% for rule in chrony_server.allow | default([]) %} +allow {{ rule }} +{% endfor %} +{% for rule in chrony_server.deny | default([]) %} +deny {{ rule }} +{% endfor %} +{% if 'bindaddress' in chrony_server %} +bindaddress {{ chrony_server.bind }} +{% endif %} +{% if 'port' in chrony_server %} + port {{ chrony_server.port }} +{% endif %} +{% endif %} |