Compare commits
1 Commits
109de92842
...
7f5f087922
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f5f087922 |
@@ -144,24 +144,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>cy_server_fqdn</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'ntp.example.com'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<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>
|
<li>
|
||||||
|
|
||||||
<span class='name'>cy_conf_servers</span>
|
<span class='name'>cy_conf_servers</span>
|
||||||
@@ -173,11 +155,6 @@
|
|||||||
<em class="default">(defaults to: <tt>['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org']</tt>)</em>
|
<em class="default">(defaults to: <tt>['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org']</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>List of NTP servers to point to as time source</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -191,6 +168,10 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
|
9
|
||||||
|
10
|
||||||
|
11
|
||||||
|
12
|
||||||
13
|
13
|
||||||
14
|
14
|
||||||
15
|
15
|
||||||
@@ -211,15 +192,10 @@
|
|||||||
30
|
30
|
||||||
31
|
31
|
||||||
32
|
32
|
||||||
33
|
33</pre>
|
||||||
34
|
|
||||||
35
|
|
||||||
36
|
|
||||||
37
|
|
||||||
38</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 13</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 9</span>
|
||||||
|
|
||||||
class confdroid_ntp::params (
|
class confdroid_ntp::params (
|
||||||
|
|
||||||
@@ -228,7 +204,6 @@ class confdroid_ntp::params (
|
|||||||
String $cy_pkg_ensure = 'present',
|
String $cy_pkg_ensure = 'present',
|
||||||
|
|
||||||
# configuration
|
# 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'],
|
Array $cy_conf_servers = ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'],
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -5,11 +5,7 @@
|
|||||||
# @param [Array] cy_reqpackages List of required packages to install
|
# @param [Array] cy_reqpackages List of required packages to install
|
||||||
# for the confdroid_ntp module.
|
# for the confdroid_ntp module.
|
||||||
# @param [String] cy_pkg_ensure Ensure state of the required packages.
|
# @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 (
|
class confdroid_ntp::params (
|
||||||
|
|
||||||
# installation
|
# installation
|
||||||
@@ -17,7 +13,6 @@ class confdroid_ntp::params (
|
|||||||
String $cy_pkg_ensure = 'present',
|
String $cy_pkg_ensure = 'present',
|
||||||
|
|
||||||
# configuration
|
# 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'],
|
Array $cy_conf_servers = ['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org'],
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
### chrony.conf created by Puppet, manual changes will be overwritten ###
|
### 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 -%>
|
|
||||||
Reference in New Issue
Block a user