diff --git a/README.md b/README.md index 70709930..8d76b95c 100644 --- a/README.md +++ b/README.md @@ -635,6 +635,16 @@ Specifies the cohort tos option. Valid options: 0 or 1. Default value: 0. +#### `tos_orphan` + +Optional. + +Data type: Integer[1]. + +Enables orphan mode at stated stratum level. The recommended value for tos\_orphan is 2 more than the worst-case externally-reachable source of time. +Participing ntpd instances must be in a mesh with each others (e.g. peers). +[ntp.org](http://support.ntp.org/bin/view/Support/OrphanMode) + #### `tinker` Data type: Boolean. diff --git a/data/common.yaml b/data/common.yaml index c2b66737..afd5ca69 100644 --- a/data/common.yaml +++ b/data/common.yaml @@ -59,6 +59,7 @@ ntp::tos_floor: 1 ntp::tos_maxclock: 6 ntp::tos_minclock: 3 ntp::tos_minsane: 1 +ntp::tos_orphan: ~ ntp::tos: false ntp::udlc_stratum: 10 ntp::udlc: false diff --git a/manifests/init.pp b/manifests/init.pp index 5acc9b39..39f13f10 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -109,6 +109,10 @@ # @param peers # List of NTP servers with which to synchronise the local clock. # +# @param tos_orphan +# Enables Orphan mode for peer group +# Value: Should be set to 2 more than the worst-case externally-reachable source's stratum. +# # @param pool # List of NTP server pools with which to synchronise the local clock. # @@ -255,6 +259,7 @@ Optional[Integer[1]] $tos_minsane, Optional[Integer[1]] $tos_floor, Optional[Integer[1]] $tos_ceiling, + Optional[Integer[1]] $tos_orphan, Variant[Boolean, Integer[0,1]] $tos_cohort, Boolean $udlc, Optional[Integer[1,15]] $udlc_stratum, diff --git a/templates/ntp.conf.epp b/templates/ntp.conf.epp index 697ed69f..e52829a7 100644 --- a/templates/ntp.conf.epp +++ b/templates/ntp.conf.epp @@ -101,6 +101,10 @@ ntpsigndsocket <%= $ntp::ntpsigndsocket %> <% $ntp::peers.each |$peer| {-%> peer <%= $peer %> <% } -%> +<% if $ntp::tos_orphan {-%> +# Enable peer group orphan mode +tos orphan <%= $ntp::tos_orphan %> +<% } -%> <% } -%> <% unless $ntp::pool.empty {-%>