Compare commits

..

1 Commits

Author SHA1 Message Date
Jenkins Server
ef549cf412 Merge remote-tracking branch 'origin/master' into jenkins-build-21 2026-10-02 15:10:52 +02:00
6 changed files with 16 additions and 226 deletions

View File

@@ -30,20 +30,13 @@ Time management in Linux is important. The underlying protocol is ntp, the servi
## Features ## Features
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`.
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).
INSTALLATION INSTALLATION
- installs chrony binaries - installs chrony binaries
CONFIGURATION CONFIGURATION
- manage directories including selinux contexts - manage directories and files including templates
- and files and their templates including selinux contexts
- manage service - manage service
- optional: include nagios target for the chrony service (set `cy_manage_nagios`to `true`) - optional: include nagios target for the chrony service (set `cy_manage_nagios`to `true`)

View File

@@ -103,12 +103,6 @@
<h2 id="label-Features">Features</h2> <h2 id="label-Features">Features</h2>
<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>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>INSTALLATION</p> <p>INSTALLATION</p>
<ul><li> <ul><li>
<p>installs chrony binaries</p> <p>installs chrony binaries</p>
@@ -116,9 +110,7 @@
<p>CONFIGURATION</p> <p>CONFIGURATION</p>
<ul><li> <ul><li>
<p>manage directories including selinux contexts</p> <p>manage directories and files including templates</p>
</li><li>
<p>and files and their templates including selinux contexts</p>
</li><li> </li><li>
<p>manage service</p> <p>manage service</p>
</li><li> </li><li>

View File

@@ -103,12 +103,6 @@
<h2 id="label-Features">Features</h2> <h2 id="label-Features">Features</h2>
<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>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>INSTALLATION</p> <p>INSTALLATION</p>
<ul><li> <ul><li>
<p>installs chrony binaries</p> <p>installs chrony binaries</p>
@@ -116,9 +110,7 @@
<p>CONFIGURATION</p> <p>CONFIGURATION</p>
<ul><li> <ul><li>
<p>manage directories including selinux contexts</p> <p>manage directories and files including templates</p>
</li><li>
<p>and files and their templates including selinux contexts</p>
</li><li> </li><li>
<p>manage service</p> <p>manage service</p>
</li><li> </li><li>

View File

@@ -152,7 +152,7 @@
<span class='type'>(<tt>String</tt>)</span> <span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;ntp.example.local&#39;</tt>)</em> <em class="default">(defaults to: <tt>&#39;ntp.example.com&#39;</tt>)</em>
&mdash; &mdash;
@@ -176,96 +176,6 @@
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>List of NTP servers to point to as time source</p> <p>List of NTP servers to point to as time source</p>
</div>
</li>
<li>
<span class='name'>cy_min_sources</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;3&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Minimum number of selectable sources required to adjust the system clock. Primarily used for servers.</p>
</div>
</li>
<li>
<span class='name'>cy_client_allow</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;192.168.1.0/24&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>CIDR notation for allowed client networks</p>
</div>
</li>
<li>
<span class='name'>cy_leapsec_mode</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;slew&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Leap second handling mode. Valid values are ‘slew’ or ‘step’.</p>
</div>
</li>
<li>
<span class='name'>cy_leapsectz</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;right/UTC&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Leap second timezone file to use.</p>
</div>
</li>
<li>
<span class='name'>cy_loginfo</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;measurements statistics tracking&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Log information to record. Valid values are ‘measurements’, ‘statistics’, and ‘tracking’.</p>
</div> </div>
</li> </li>
@@ -281,6 +191,14 @@
<pre class="lines"> <pre class="lines">
13
14
15
16
17
18
19
20
21 21
22 22
23 23
@@ -301,23 +219,10 @@
38 38
39 39
40 40
41 41</pre>
42
43
44
45
46
47
48
49
50
51
52
53
54</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 13</span>
class confdroid_ntp::params ( class confdroid_ntp::params (
@@ -326,13 +231,8 @@ class confdroid_ntp::params (
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;, String $cy_server_fqdn = &#39;ntp.example.com&#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;], 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_min_sources = &#39;3&#39;,
String $cy_client_allow = &#39;192.168.1.0/24&#39;,
String $cy_leapsec_mode = &#39;slew&#39;,
String $cy_leapsectz = &#39;right/UTC&#39;,
String $cy_loginfo = &#39;measurements statistics tracking&#39;,
) { ) {
# facts # facts

View File

@@ -9,14 +9,6 @@
# If the fqdn of the host matches this value, a time server will be # If the fqdn of the host matches this value, a time server will be
# configured, else a client. # configured, else a client.
# @param [Array] cy_conf_servers List of NTP servers to point to as time source # @param [Array] cy_conf_servers List of NTP servers to point to as time source
# @param [String] cy_min_sources Minimum number of selectable sources required
# to adjust the system clock. Primarily used for servers.
# @param [String] cy_client_allow CIDR notation for allowed client networks
# @param [String] cy_leapsec_mode Leap second handling mode. Valid values are
# 'slew' or 'step'.
# @param [String] cy_leapsectz Leap second timezone file to use.
# @param [String] cy_loginfo Log information to record. Valid values are
# 'measurements', 'statistics', and 'tracking'.
############################################################################### ###############################################################################
class confdroid_ntp::params ( class confdroid_ntp::params (
@@ -25,13 +17,8 @@ class confdroid_ntp::params (
String $cy_pkg_ensure = 'present', String $cy_pkg_ensure = 'present',
# configuration # configuration
String $cy_server_fqdn = 'ntp.example.local', String $cy_server_fqdn = 'ntp.example.com',
Array $cy_conf_servers = ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'], Array $cy_conf_servers = ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'],
String $cy_min_sources = '3',
String $cy_client_allow = '192.168.1.0/24',
String $cy_leapsec_mode = 'slew',
String $cy_leapsectz = 'right/UTC',
String $cy_loginfo = 'measurements statistics tracking',
) { ) {
# facts # facts

View File

@@ -21,43 +21,6 @@ driftfile /var/lib/chrony/drift
# if its offset is larger than 1 second. # if its offset is larger than 1 second.
makestep 1.0 3 makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock.
minsources <%= @cy_min_sources %>
# Allow NTP client access from local network.
allow <%= @cy_client_allow %>
# Serve time even if not synchronized to a time source.
local stratum 10
# Require authentication (nts or key option) for all NTP sources.
#authselectmode require
# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys
# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony
# Insert/delete leap seconds by slewing instead of stepping.
leapsecmode <%= @cy_leapsec_mode %>
# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz <%= @cy_leapsectz %>
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
log <%= @cy_loginfo %>
<% end %> <% end %>
@@ -75,41 +38,4 @@ driftfile /var/lib/chrony/drift
# if its offset is larger than 1 second. # if its offset is larger than 1 second.
makestep 1.0 3 makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock. Primarily for servers.
#minsources 2
# Allow NTP client access from local network.
#allow 192.168.0.0/16
# Serve time even if not synchronized to a time source.
#local stratum 10
# Require authentication (nts or key option) for all NTP sources.
#authselectmode require
# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys
# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony
# Insert/delete leap seconds by slewing instead of stepping.
leapsecmode <%= @cy_leapsec_mode %>
# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz <%= @cy_leapsectz %>
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
log <%= @cy_loginfo %>
<% end %> <% end %>