Skip to content

Commit

Permalink
Remove unneded condition for Array $chrony::cmdacl
Browse files Browse the repository at this point in the history
And also decrease nr of empty lines added to configfile.
  • Loading branch information
chrekh committed Jul 9, 2020
1 parent aa4be5a commit 1defd56
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions templates/chrony.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pool <%= $pool.flatten.join(' ') %>
<% $chrony::peers.each |$peer| { -%>
peer <%= $peer.flatten.join(' ') %>
<% } -%>

<% if $chrony::stratumweight { -%>

# How much distance should be added per stratum to the synchronisation distance when
Expand Down Expand Up @@ -43,12 +42,9 @@ cmdport <%= $chrony::cmdport %>
bindcmdaddress <%= $addr %>
<% } -%>
<% } -%>
<% if ! $chrony::cmdacl.empty { -%>
<% $chrony::cmdacl.each |$acl| { -%>
<% $chrony::cmdacl.each |$acl| { -%>
<%= $acl %>
<% } -%>
<% } -%>

<% if $chrony::port { -%>

# http://chrony.tuxfamily.org/manual.html#port-directive
Expand Down Expand Up @@ -78,7 +74,6 @@ clientloglimit <%= $chrony::clientloglimit %>

# Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
logchange 0.5

<% if $chrony::mailonchange { -%>

# Send mail if chronyd applied a correction exceeding given threshold.
Expand All @@ -105,22 +100,22 @@ lock_all
# https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#leapsecmode
leapsecmode <%= $chrony::leapsecmode %>
<% } -%>
<% if $chrony::leapsectz { %>
<% if $chrony::leapsectz { -%>

# https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#leapsectz
leapsectz <%= $chrony::leapsectz %>
<% } -%>
<% if $chrony::maxslewrate { %>
<% if $chrony::maxslewrate { -%>

# https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#maxslewrate
maxslewrate <%= $chrony::maxslewrate %>
<% } -%>
<% if $chrony::smoothtime { %>
<% if $chrony::smoothtime { -%>

# https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#smoothtime
smoothtime <%= $chrony::smoothtime %>
<% } -%>
<% if $chrony::rtconutc { %>
<% if $chrony::rtconutc { -%>

# https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#rtconutc
rtconutc
Expand Down

0 comments on commit 1defd56

Please sign in to comment.