Compare commits

..

5 Commits

Author SHA1 Message Date
Jenkins Server
9feb38dd82 Recommit for updates in build 24 2026-10-02 16:07:00 +02:00
Jenkins Server
99c69fba78 Merge remote-tracking branch 'origin/master' into jenkins-build-24 2026-10-02 16:06:10 +02:00
bbc11e96e3 OP#830 add bollean for toggling using lan server 2026-10-02 16:05:55 +02:00
28879cbf65 OP#830 add bollean for toggling using lan server 2026-10-02 16:03:13 +02:00
Jenkins Server
2a707a4bab Recommit for updates in build 22 2026-10-02 15:49:43 +02:00
6 changed files with 67 additions and 39 deletions

View File

@@ -32,7 +32,7 @@ Time management in Linux is important. The underlying protocol is ntp, the servi
This module differentiates between client- and server configuration. If the `FQDN` of the puppet client matches the value of `cy_server_fqdn`, it assumes this to be an ntp time server, else it will be a client. This module differentiates between client- and server configuration. If the `FQDN` of the puppet client matches the value of `cy_server_fqdn`, it assumes this to be an ntp time server, else it will be a client.
If you have no local time server(s), leave the default for `cy_server_fqdn`. If you have no local time server(s), leave `cy_use_lan_server` at `false` (default), else set it to `true`. This affects only client configurations.
The value for `cy_server_fqdn` is a string rather array, assuming either a single time server or a round-robin DNS entry for this, returning several values for the time server (not configured by this module). The value for `cy_server_fqdn` is a string rather array, assuming either a single time server or a round-robin DNS entry for this, returning several values for the time server (not configured by this module).

View File

@@ -105,7 +105,7 @@
<p>This module differentiates between client- and server configuration. If the <code>FQDN</code> of the puppet client matches the value of <code>cy_server_fqdn</code>, it assumes this to be an ntp time server, else it will be a client.</p> <p>This module differentiates between client- and server configuration. If the <code>FQDN</code> of the puppet client matches the value of <code>cy_server_fqdn</code>, it assumes this to be an ntp time server, else it will be a client.</p>
<p>If you have no local time server(s), leave the default for <code>cy_server_fqdn</code>.</p> <p>If you have no local time server(s), leave <code>cy_use_lan_server</code> at <code>false</code> (default), else set it to <code>true</code>. This affects only client configurations.</p>
<p>The value for <code>cy_server_fqdn</code> is a string rather array, assuming either a single time server or a round-robin DNS entry for this, returning several values for the time server (not configured by this module).</p> <p>The value for <code>cy_server_fqdn</code> is a string rather array, assuming either a single time server or a round-robin DNS entry for this, returning several values for the time server (not configured by this module).</p>

View File

@@ -105,7 +105,7 @@
<p>This module differentiates between client- and server configuration. If the <code>FQDN</code> of the puppet client matches the value of <code>cy_server_fqdn</code>, it assumes this to be an ntp time server, else it will be a client.</p> <p>This module differentiates between client- and server configuration. If the <code>FQDN</code> of the puppet client matches the value of <code>cy_server_fqdn</code>, it assumes this to be an ntp time server, else it will be a client.</p>
<p>If you have no local time server(s), leave the default for <code>cy_server_fqdn</code>.</p> <p>If you have no local time server(s), leave <code>cy_use_lan_server</code> at <code>false</code> (default), else set it to <code>true</code>. This affects only client configurations.</p>
<p>The value for <code>cy_server_fqdn</code> is a string rather array, assuming either a single time server or a round-robin DNS entry for this, returning several values for the time server (not configured by this module).</p> <p>The value for <code>cy_server_fqdn</code> is a string rather array, assuming either a single time server or a round-robin DNS entry for this, returning several values for the time server (not configured by this module).</p>

View File

@@ -266,6 +266,24 @@
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>Log information to record. Valid values are ‘measurements’, ‘statistics’, and ‘tracking’.</p> <p>Log information to record. Valid values are ‘measurements’, ‘statistics’, and ‘tracking’.</p>
</div>
</li>
<li>
<span class='name'>cy_use_lan_server</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to use a local LAN server or external pool.</p>
</div> </div>
</li> </li>
@@ -281,7 +299,6 @@
<pre class="lines"> <pre class="lines">
21
22 22
23 23
24 24
@@ -314,41 +331,44 @@
51 51
52 52
53 53
54</pre> 54
55
56</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 21</span> <pre class="code"><span class="info file"># File 'manifests/params.pp', line 22</span>
class confdroid_ntp::params ( class confdroid_ntp::params (
# installation # installation
Array $cy_reqpackages = [&#39;chrony&#39;], Array $cy_reqpackages = [&#39;chrony&#39;],
String $cy_pkg_ensure = &#39;present&#39;, String $cy_pkg_ensure = &#39;present&#39;,
# configuration # configuration
String $cy_server_fqdn = &#39;ntp.example.local&#39;, Boolean $cy_use_lan_server = false,
Array $cy_conf_servers = [&#39;0.pool.ntp.org&#39;, &#39;1.pool.ntp.org&#39;, &#39;2.pool.ntp.org&#39;, &#39;3.pool.ntp.org&#39;], String $cy_server_fqdn = &#39;ntp.example.local&#39;,
String $cy_min_sources = &#39;3&#39;, Array $cy_conf_servers = [&#39;0.pool.ntp.org&#39;, &#39;1.pool.ntp.org&#39;, &#39;2.pool.ntp.org&#39;, &#39;3.pool.ntp.org&#39;],
String $cy_client_allow = &#39;192.168.1.0/24&#39;, String $cy_min_sources = &#39;3&#39;,
String $cy_leapsec_mode = &#39;slew&#39;, String $cy_client_allow = &#39;192.168.1.0/24&#39;,
String $cy_leapsectz = &#39;right/UTC&#39;, String $cy_leapsec_mode = &#39;slew&#39;,
String $cy_loginfo = &#39;measurements statistics tracking&#39;, String $cy_leapsectz = &#39;right/UTC&#39;,
String $cy_loginfo = &#39;measurements statistics tracking&#39;,
) { ) {
# facts # facts
$fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;] $fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;]
$domain = $facts[&#39;networking&#39;][&#39;domain&#39;] $domain = $facts[&#39;networking&#39;][&#39;domain&#39;]
$os_name = $facts[&#39;os&#39;][&#39;name&#39;] $os_name = $facts[&#39;os&#39;][&#39;name&#39;]
$os_release = $facts[&#39;os&#39;][&#39;release&#39;][&#39;major&#39;] $os_release = $facts[&#39;os&#39;][&#39;release&#39;][&#39;major&#39;]
# dirs # dirs
# files # files
$cy_conf_file = &#39;/etc/chrony.conf&#39; $cy_conf_file = &#39;/etc/chrony.conf&#39;
$cy_conf_erb = &#39;confdroid_ntp/chrony.conf.erb&#39; $cy_conf_erb = &#39;confdroid_ntp/chrony.conf.erb&#39;
# service # service
$cy_service = &#39;chronyd&#39; $cy_service = &#39;chronyd&#39;
# includes must be last # includes must be last
include confdroid_ntp::main::config include confdroid_ntp::main::config

View File

@@ -17,37 +17,39 @@
# @param [String] cy_leapsectz Leap second timezone file to use. # @param [String] cy_leapsectz Leap second timezone file to use.
# @param [String] cy_loginfo Log information to record. Valid values are # @param [String] cy_loginfo Log information to record. Valid values are
# 'measurements', 'statistics', and 'tracking'. # 'measurements', 'statistics', and 'tracking'.
# @param [Boolean] cy_use_lan_server Whether to use a local LAN server or external pool.
############################################################################### ###############################################################################
class confdroid_ntp::params ( class confdroid_ntp::params (
# installation # installation
Array $cy_reqpackages = ['chrony'], Array $cy_reqpackages = ['chrony'],
String $cy_pkg_ensure = 'present', String $cy_pkg_ensure = 'present',
# configuration # configuration
String $cy_server_fqdn = 'ntp.example.local', Boolean $cy_use_lan_server = false,
Array $cy_conf_servers = ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'], String $cy_server_fqdn = 'ntp.example.local',
String $cy_min_sources = '3', Array $cy_conf_servers = ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'],
String $cy_client_allow = '192.168.1.0/24', String $cy_min_sources = '3',
String $cy_leapsec_mode = 'slew', String $cy_client_allow = '192.168.1.0/24',
String $cy_leapsectz = 'right/UTC', String $cy_leapsec_mode = 'slew',
String $cy_loginfo = 'measurements statistics tracking', String $cy_leapsectz = 'right/UTC',
String $cy_loginfo = 'measurements statistics tracking',
) { ) {
# facts # facts
$fqdn = $facts['networking']['fqdn'] $fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain'] $domain = $facts['networking']['domain']
$os_name = $facts['os']['name'] $os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major'] $os_release = $facts['os']['release']['major']
# dirs # dirs
# files # files
$cy_conf_file = '/etc/chrony.conf' $cy_conf_file = '/etc/chrony.conf'
$cy_conf_erb = 'confdroid_ntp/chrony.conf.erb' $cy_conf_erb = 'confdroid_ntp/chrony.conf.erb'
# service # service
$cy_service = 'chronyd' $cy_service = 'chronyd'
# includes must be last # includes must be last
include confdroid_ntp::main::config include confdroid_ntp::main::config

View File

@@ -63,7 +63,13 @@ log <%= @cy_loginfo %>
<% if @fqdn != @cy_server_fqdn -%> <% if @fqdn != @cy_server_fqdn -%>
# This is a time client configuration file # This is a time client configuration file
<% if @cy_use_lan_server -%>
server <%= @cy_server_fqdn %> iburst server <%= @cy_server_fqdn %> iburst
<% else -%>
# Use public servers from the pool.ntp.org project.
<% @cy_conf_servers.each do |this_server| -%>
server <%= this_server %> iburst
<% end end -%>
# Use NTP servers from DHCP. # Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp sourcedir /run/chrony-dhcp
@@ -79,7 +85,7 @@ makestep 1.0 3
rtcsync rtcsync
# Enable hardware timestamping on all interfaces that support it. # Enable hardware timestamping on all interfaces that support it.
hwtimestamp * # hwtimestamp *
# Increase the minimum number of selectable sources required to adjust # Increase the minimum number of selectable sources required to adjust
# the system clock. Primarily for servers. # the system clock. Primarily for servers.