From 95eb81e125b6b257758e97c41d3126b11b9eefce Mon Sep 17 00:00:00 2001 From: olevole Date: Sat, 7 Jan 2017 22:28:39 +0300 Subject: [PATCH 1/3] Fix for syntax error in tos area - we need separate params by spaces. Add maxclock params. Add tested version of FreeBSD platform --- manifests/init.pp | 1 + templates/ntp.conf.epp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 6f10e7ff..53c91b57 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -108,6 +108,7 @@ Optional[String] $step_tickers_template, Optional[Boolean] $tinker, Boolean $tos, + Optional[Integer[1]] $tos_maxclock, Optional[Integer[1]] $tos_minclock, Optional[Integer[1]] $tos_minsane, Optional[Integer[1]] $tos_floor, diff --git a/templates/ntp.conf.epp b/templates/ntp.conf.epp index a9f0ac04..05a612b4 100644 --- a/templates/ntp.conf.epp +++ b/templates/ntp.conf.epp @@ -130,7 +130,7 @@ leapfile <%= $ntp::leapfile %> <% } -%> <%# -%> <% if $ntp::tos {-%> -tos <% if $ntp::tos_minclock {-%> minclock <%= $ntp::tos_minclock %><% } %> <% if $ntp::tos_minsane {-%> minsane <%= $ntp::tos_minsane %> <% } %><% if $ntp::tos_floor {-%> floor <%= $ntp::tos_floor %><% } %> <% if $ntp::tos_ceiling {-%> ceiling <%= $ntp::tos_ceiling %><% } %> <% if $ntp::tos_cohort {-%> cohort <%= $ntp::tos_cohort %><% } %> +tos <% if $ntp::tos_minclock {-%> minclock <%= $ntp::tos_minclock %><% } %> <% if $ntp::tos_maxclock {-%> maxclock <%= $ntp::tos_maxclock %><% } %> <% if $ntp::tos_minsane {-%> minsane <%= $ntp::tos_minsane %><% } %> <% if $ntp::tos_floor {-%> floor <%= $ntp::tos_floor %><% } %> <% if $ntp::tos_ceiling {-%> ceiling <%= $ntp::tos_ceiling %><% } %> <% if $ntp::tos_cohort {-%> cohort <%= $ntp::tos_cohort %><% } %> <% } %> <%# -%> <% if $ntp::authprov {-%> From a4eb8ce56fd6186405ec24ffea9d042426977bc9 Mon Sep 17 00:00:00 2001 From: olevole Date: Sat, 7 Jan 2017 23:17:59 +0300 Subject: [PATCH 2/3] Forget maxclock defaults for #365 issue --- data/common.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/data/common.yaml b/data/common.yaml index 47bcb51a..b6606d34 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -55,6 +55,7 @@ ntp::tos_ceiling: 15 ntp::tos_cohort: 0 ntp::tos_floor: 1 ntp::tos_minclock: 3 +ntp::tos_maxclock: 6 ntp::tos_minsane: 1 ntp::tos: false ntp::udlc_stratum: 10 From d44e9817679c741a98862c42f1684db07eba3244 Mon Sep 17 00:00:00 2001 From: tphoney Date: Mon, 10 Jul 2017 10:31:08 +0100 Subject: [PATCH 3/3] Adding tos_maxclock and cleanup to ntp.conf --- README.md | 10 ++++++++++ data/common.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f7e9895..0d306a00 100644 --- a/README.md +++ b/README.md @@ -558,6 +558,16 @@ Whether to enable tos options. Default value: `false`. +#### `tos_maxclock` + +Optional. + +Data type: Integer[1]. + +Specifies the maxclock tos option. + +Default value: 6. + #### `tos_minclock` Optional. diff --git a/data/common.yaml b/data/common.yaml index b6606d34..50921822 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -54,8 +54,8 @@ ntp::tinker: ~ ntp::tos_ceiling: 15 ntp::tos_cohort: 0 ntp::tos_floor: 1 -ntp::tos_minclock: 3 ntp::tos_maxclock: 6 +ntp::tos_minclock: 3 ntp::tos_minsane: 1 ntp::tos: false ntp::udlc_stratum: 10