Skip to content

Commit 44f778a

Browse files
committed
Merge pull request #452 from disklord/tos_orphan
add tos_orphan parameter
2 parents 849428a + fe3b2e9 commit 44f778a

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,16 @@ Specifies the cohort tos option. Valid options: 0 or 1.
635635

636636
Default value: 0.
637637

638+
#### `tos_orphan`
639+
640+
Optional.
641+
642+
Data type: Integer[1].
643+
644+
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.
645+
Participing ntpd instances must be in a mesh with each others (e.g. peers).
646+
[ntp.org](http://support.ntp.org/bin/view/Support/OrphanMode)
647+
638648
#### `tinker`
639649

640650
Data type: Boolean.

data/common.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ ntp::tos_floor: 1
5959
ntp::tos_maxclock: 6
6060
ntp::tos_minclock: 3
6161
ntp::tos_minsane: 1
62+
ntp::tos_orphan: ~
6263
ntp::tos: false
6364
ntp::udlc_stratum: 10
6465
ntp::udlc: false

manifests/init.pp

+5
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@
109109
# @param peers
110110
# List of NTP servers with which to synchronise the local clock.
111111
#
112+
# @param tos_orphan
113+
# Enables Orphan mode for peer group
114+
# Value: Should be set to 2 more than the worst-case externally-reachable source's stratum.
115+
#
112116
# @param pool
113117
# List of NTP server pools with which to synchronise the local clock.
114118
#
@@ -255,6 +259,7 @@
255259
Optional[Integer[1]] $tos_minsane,
256260
Optional[Integer[1]] $tos_floor,
257261
Optional[Integer[1]] $tos_ceiling,
262+
Optional[Integer[1]] $tos_orphan,
258263
Variant[Boolean, Integer[0,1]] $tos_cohort,
259264
Boolean $udlc,
260265
Optional[Integer[1,15]] $udlc_stratum,

templates/ntp.conf.epp

+4
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ ntpsigndsocket <%= $ntp::ntpsigndsocket %>
101101
<% $ntp::peers.each |$peer| {-%>
102102
peer <%= $peer %>
103103
<% } -%>
104+
<% if $ntp::tos_orphan {-%>
105+
# Enable peer group orphan mode
106+
tos orphan <%= $ntp::tos_orphan %>
107+
<% } -%>
104108
<% } -%>
105109
<% unless $ntp::pool.empty {-%>
106110

0 commit comments

Comments
 (0)