Skip to content
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

(MODULES-3396) remove superfluous empty lines in ntp.conf #373

Merged
merged 1 commit into from
Mar 10, 2017
Merged
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
36 changes: 21 additions & 15 deletions templates/ntp.conf.epp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ntp.conf: Managed by puppet.
#
<% if $ntp::_tinker and ($ntp::_panic or $ntp::stepout) {-%>
# Enable next tinker options:
# panic - keep ntpd from panicking in the event of a large clock skew
# when a VM guest is suspended and resumed;
# stepout - allow ntpd change offset faster
<% if $ntp::_tinker and ($ntp::_panic or $ntp::stepout) {-%>
tinker<% if $ntp::_panic { %> panic <%= $ntp::_panic %><% } %><%if $ntp::stepout { %> stepout <%=$ntp::stepout %><% } %>
<% } -%>

<%# -%>
<% if $ntp::disable_monitor {-%>
disable monitor
<% } else {-%>
Expand All @@ -27,17 +27,19 @@ disable auth
<% if $ntp::disable_kernel {-%>
disable kernel
<% } -%>

<%# -%>
<% unless $ntp::restrict.empty {-%>

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
<% $ntp::restrict.each |$restrict| {-%>
restrict <%= $restrict %>
<% } -%>
<% } -%>

<%# -%>
<% unless $ntp::interfaces.empty {-%>
<% if $ntp::interfaces_ignore.empty {-%>

# Ignore wildcard interface and only listen on the following specified
# interfaces
interface ignore wildcard
Expand All @@ -50,7 +52,7 @@ interface ignore <%= $interface %>
interface listen <%= $interface %>
<% } -%>
<% } -%>

<%# -%>
<% if $ntp::broadcastclient {-%>
broadcastclient
<% } -%>
Expand All @@ -64,8 +66,9 @@ broadcastclient
<% $ntp::servers.each |$server| {-%>
server <%= $server %><% if $ntp::iburst_enable == true {%> iburst<% } %><% if ($ntp::preferred_servers).member($server) { %> prefer<% } %><% if $ntp::minpoll { %> minpoll <%= $ntp::minpoll %><% } %><% if $ntp::maxpoll { %> maxpoll <%= $ntp::maxpoll %><% } %>
<% } -%>

<%# -%>
<% if $ntp::udlc {-%>

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server 127.127.1.0
Expand All @@ -75,32 +78,34 @@ restrict 127.127.1.0

# Driftfile.
driftfile <%= $ntp::driftfile %>

<%# -%>
<% if $ntp::logfile {-%>

# Logfile
logfile <%= $ntp::logfile %>
<% } -%>

<%# -%>
<% if $ntp::ntpsigndsocket {-%>

# Enable signed packets
ntpsigndsocket <%= $ntp::ntpsigndsocket %>
<% } -%>

<%# -%>
<% unless $ntp::peers.empty {-%>

# Peers
<% $ntp::peers.each |$peer| {-%>
peer <%= $peer %>
<% } -%>
<% } -%>

<% unless $ntp::pool.empty {-%>

# Pool
<% $ntp::pool.each |$pool_srv| {-%>
pool <%= $pool_srv %>
<% } -%>
<% } -%>


<%# -%>
<% if $ntp::keys_enable {-%>
keys <%= $ntp::keys_file %>
<% unless $ntp::keys_trusted.empty {-%>
Expand All @@ -116,16 +121,17 @@ controlkey <%= $ntp::keys_controlkey %>
<% $ntp::fudge.each |$entry| {-%>
fudge <%= $entry %>
<% } -%>

<%# -%>
<% if $ntp::leapfile {-%>

# Leapfile
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 %><% } %>
<% } %>

<%# -%>
<% if $ntp::authprov {-%>
authprov <%= $ntp::authprov %>
<% } -%>