Skip to content

add tos_orphan parameter #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions templates/ntp.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {-%>

Expand Down