Compare commits

..

6 Commits

Author SHA1 Message Date
Jenkins Server
109de92842 Recommit for updates in build 7 2026-10-02 13:39:04 +02:00
Jenkins Server
52118d4942 Merge remote-tracking branch 'origin/master' into jenkins-build-7 2026-10-02 13:38:14 +02:00
b746833fc2 OP#830 divide conf file between server and client 2026-10-02 13:37:56 +02:00
2405e13646 OP#830 divide conf file between server and client 2026-10-02 13:36:13 +02:00
1184597d70 OP#830 add server vs pool control 2026-10-02 13:32:06 +02:00
Jenkins Server
ce8bc3ef19 Recommit for updates in build 5 2026-10-02 12:58:40 +02:00
5 changed files with 55 additions and 10 deletions

View File

@@ -144,7 +144,7 @@ class confdroid_ntp::main::files (
seltype => etc_t,
seluser => system_u,
content => template($cy_conf_erb),
notify => Service[$cy_service],
notify => Service[$cy_service],
}
# drift file /var/lib/chrony/drift

View File

@@ -144,6 +144,24 @@
</li>
<li>
<span class='name'>cy_server_fqdn</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;ntp.example.com&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>FQDN of the NTP server to configure. If the fqdn of the host matches this value, a time server will be configured, else a client.</p>
</div>
</li>
<li>
<span class='name'>cy_conf_servers</span>
@@ -155,6 +173,11 @@
<em class="default">(defaults to: <tt>[&#39;0.pool.ntp.org&#39;, &#39;1.pool.ntp.org&#39;, &#39;2.pool.ntp.org&#39;, &#39;3.pool.ntp.org&#39;]</tt>)</em>
&mdash;
<div class='inline'>
<p>List of NTP servers to point to as time source</p>
</div>
</li>
</ul>
@@ -168,10 +191,6 @@
<pre class="lines">
9
10
11
12
13
14
15
@@ -192,10 +211,15 @@
30
31
32
33</pre>
33
34
35
36
37
38</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 9</span>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 13</span>
class confdroid_ntp::params (
@@ -204,6 +228,7 @@ class confdroid_ntp::params (
String $cy_pkg_ensure = &#39;present&#39;,
# configuration
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;],
) {

View File

@@ -19,7 +19,7 @@ class confdroid_ntp::main::files (
seltype => etc_t,
seluser => system_u,
content => template($cy_conf_erb),
notify => Service[$cy_service],
notify => Service[$cy_service],
}
# drift file /var/lib/chrony/drift

View File

@@ -5,7 +5,11 @@
# @param [Array] cy_reqpackages List of required packages to install
# for the confdroid_ntp module.
# @param [String] cy_pkg_ensure Ensure state of the required packages.
##############################################################################
# @param [String] cy_server_fqdn FQDN of the NTP server to configure.
# If the fqdn of the host matches this value, a time server will be
# configured, else a client.
# @param [Array] cy_conf_servers List of NTP servers to point to as time source
###############################################################################
class confdroid_ntp::params (
# installation
@@ -13,6 +17,7 @@ class confdroid_ntp::params (
String $cy_pkg_ensure = 'present',
# configuration
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'],
) {

View File

@@ -1,3 +1,18 @@
################################################################################
### chrony.conf created by Puppet, manual changes will be overwritten ###
################################################################################
### original chrony.conf file can be found at https://3for.me/2t0an ###
################################################################################
<% if @fqdn == @cy_server_fqdn -%>
# This is a time server configuration file
<% @cy_conf_servers.each do |this_server| -%>
pool <%= this_server %> iburst
<% end -%>
<% if @fqdn != @cy_server_fqdn -%>
# This is a time client configuration file
<% end -%>
<% end -%>