<commit_before># Generated by Chef for <%= node['fqdn'] %>
# Local modifications will be overwritten.
<%# Windows OHAI does not support determining if a host is a guest %>
<% unless node['platform'] == 'windows' -%>
<%-%>tinker <%= node['ntp']['tinker'].flatten.join(' ') %>
<%-%>statsdir <%= node['ntp']['statsdir'] %>
<%   if @ntpd_supports_native_leapfiles -%>
<%-%>leapfile <%= node['ntp']['leapfile'] %>
<%   end -%>
<% end -%>
driftfile <%= node['ntp']['driftfile'] %>
<% if node['ntp']['logfile'] -%>
<%-%>logfile <%= node['ntp']['logfile'] %>
<% end -%>

<%# Enable logs only if statistics option is defined %>
<% if node['ntp']['statistics'] -%>
<%-%>statistics loopstats peerstats clockstats
<%-%>filegen loopstats file loopstats type day enable
<%-%>filegen peerstats file peerstats type day enable
<%-%>filegen clockstats file clockstats type day enable
<% end -%>

<%# If the ignore attribute is set on the node, then apply it %>
<% unless node['ntp']['ignore'].nil? -%>
<%   Array(node['ntp']['ignore']).each do |ignore| -%>
interface ignore <%= ignore %>
<%   end -%>
<% end -%>

<%# If the listen attribute is set on the node, then apply it %>
<% unless node['ntp']['listen'].nil? -%>
<%   Array(node['ntp']['listen']).each do |listen| -%>
interface listen <%= listen %>
<%   end -%>
<%#  The service must always listen on localhost %>
<%   unless Array(node['ntp']['listen']).include? '127.0.0.1' -%>
 interface listen 127.0.0.1    interface listen 127.0.0.1
<%   end -%>
<% end -%>

<% if node['ntp']['monitor'] -%>
enable monitor
<% else -%>
disable monitor
<% end -%>

<%# If ntp.peers is not empty %>
<% unless node['ntp']['peers'].empty? -%>
<%   node['ntp']['peers'].sort.each do |ntppeer| -%>
<%#    Don't peer with ourself %>
<%     if node['ipaddress'] != ntppeer && node['fqdn'] != ntppeer -%>
<%    -%>peer <%= ntppeer %><% if node['ntp']['peer']['use_iburst'] -%> iburst<% end -%><% if node['ntp']['peer']['use_burst'] -%> burst<% end -%> minpoll <%= node['ntp']['peer']['minpoll'] %> maxpoll <%= node['ntp']['peer']['maxpoll'] %>
<%    -%>restrict <%= ntppeer %> nomodify<commit_msg>Fix duplication of localhost listen directive in template<commit_after># Generated by Chef for <%= node['fqdn'] %>
# Local modifications will be overwritten.
<%# Windows OHAI does not support determining if a host is a guest %>
<% unless node['platform'] == 'windows' -%>
<%-%>tinker <%= node['ntp']['tinker'].flatten.join(' ') %>
<%-%>statsdir <%= node['ntp']['statsdir'] %>
<%   if @ntpd_supports_native_leapfiles -%>
<%-%>leapfile <%= node['ntp']['leapfile'] %>
<%   end -%>
<% end -%>
driftfile <%= node['ntp']['driftfile'] %>
<% if node['ntp']['logfile'] -%>
<%-%>logfile <%= node['ntp']['logfile'] %>
<% end -%>

<%# Enable logs only if statistics option is defined %>
<% if node['ntp']['statistics'] -%>
<%-%>statistics loopstats peerstats clockstats
<%-%>filegen loopstats file loopstats type day enable
<%-%>filegen peerstats file peerstats type day enable
<%-%>filegen clockstats file clockstats type day enable
<% end -%>

<%# If the ignore attribute is set on the node, then apply it %>
<% unless node['ntp']['ignore'].nil? -%>
<%   Array(node['ntp']['ignore']).each do |ignore| -%>
interface ignore <%= ignore %>
<%   end -%>
<% end -%>

<%# If the listen attribute is set on the node, then apply it %>
<% unless node['ntp']['listen'].nil? -%>
<%   Array(node['ntp']['listen']).each do |listen| -%>
interface listen <%= listen %>
<%   end -%>
<%#  The service must always listen on localhost %>
<%   unless Array(node['ntp']['listen']).include? '127.0.0.1' -%>
interface listen 127.0.0.1
<%   end -%>
<% end -%>

<% if node['ntp']['monitor'] -%>
enable monitor
<% else -%>
disable monitor
<% end -%>

<%# If ntp.peers is not empty %>
<% unless node['ntp']['peers'].empty? -%>
<%   node['ntp']['peers'].sort.each do |ntppeer| -%>
<%#    Don't peer with ourself %>
<%     if node['ipaddress'] != ntppeer && node['fqdn'] != ntppeer -%>
<%    -%>peer <%= ntppeer %><% if node['ntp']['peer']['use_iburst'] -%> iburst<% end -%><% if node['ntp']['peer']['use_burst'] -%> burst<% end -%> minpoll <%= node['ntp']['peer']['minpoll'] %> maxpoll <%= node['ntp']['peer']['maxpoll'] %>
<%    -%>restrict <%= ntppeer %> nomodify
{'fraction_non_alphanumeric': 0.24982307147912244, 'fraction_numerical': 0.007077140835102618, 'mean_word_length': 4.578947368421052, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 117, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2951467', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1467, 'n_words': 371}