recommit for updates in build 37
This commit is contained in:
@@ -173,12 +173,6 @@ block</code>, not per class.</p>
|
|||||||
</li><li>
|
</li><li>
|
||||||
<p>ERB Template Parser</p>
|
<p>ERB Template Parser</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)</p>
|
|
||||||
</li><li>
|
|
||||||
<p>Markdown-lint</p>
|
|
||||||
</li><li>
|
|
||||||
<p>Spellcheck</p>
|
|
||||||
</li><li>
|
|
||||||
<p>Sonar Quality Gate</p>
|
<p>Sonar Quality Gate</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
|
|||||||
@@ -173,12 +173,6 @@ block</code>, not per class.</p>
|
|||||||
</li><li>
|
</li><li>
|
||||||
<p>ERB Template Parser</p>
|
<p>ERB Template Parser</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>Test for unwanted UTF8 files in the Puppet code (see tests/UTF_Files)</p>
|
|
||||||
</li><li>
|
|
||||||
<p>Markdown-lint</p>
|
|
||||||
</li><li>
|
|
||||||
<p>Spellcheck</p>
|
|
||||||
</li><li>
|
|
||||||
<p>Sonar Quality Gate</p>
|
<p>Sonar Quality Gate</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
|
|||||||
@@ -105,9 +105,7 @@
|
|||||||
7
|
7
|
||||||
8
|
8
|
||||||
9
|
9
|
||||||
10
|
10</pre>
|
||||||
11
|
|
||||||
12</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
||||||
@@ -115,9 +113,7 @@
|
|||||||
class cd_alloy::main::config (
|
class cd_alloy::main::config (
|
||||||
|
|
||||||
) inherits cd_alloy::params {
|
) inherits cd_alloy::params {
|
||||||
|
|
||||||
include cd_alloy::main::service
|
include cd_alloy::main::service
|
||||||
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -117,8 +117,7 @@
|
|||||||
19
|
19
|
||||||
20
|
20
|
||||||
21
|
21
|
||||||
22
|
22</pre>
|
||||||
23</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||||
@@ -126,19 +125,18 @@
|
|||||||
class cd_alloy::main::dirs (
|
class cd_alloy::main::dirs (
|
||||||
|
|
||||||
) inherits cd_alloy::params {
|
) inherits cd_alloy::params {
|
||||||
|
|
||||||
require cd_alloy::main::install
|
require cd_alloy::main::install
|
||||||
|
|
||||||
# main config dir
|
# main config dir
|
||||||
file { $ay_main_dir:
|
file { $ay_main_dir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'alloy',
|
group => 'alloy',
|
||||||
mode => '0770',
|
mode => '0770',
|
||||||
selrange => s0,
|
selrange => s0,
|
||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -121,9 +121,7 @@
|
|||||||
23
|
23
|
||||||
24
|
24
|
||||||
25
|
25
|
||||||
26
|
26</pre>
|
||||||
27
|
|
||||||
28</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||||
@@ -131,25 +129,23 @@
|
|||||||
class cd_alloy::main::files (
|
class cd_alloy::main::files (
|
||||||
|
|
||||||
) inherits cd_alloy::params {
|
) inherits cd_alloy::params {
|
||||||
|
|
||||||
require cd_alloy::main::dirs
|
require cd_alloy::main::dirs
|
||||||
|
|
||||||
# Ensure log_targets is always an array
|
# Ensure log_targets is always an array
|
||||||
$log_targets_array = Array($cd_alloy::params::ay_log_targets, true)
|
$log_targets_array = Array($cd_alloy::params::ay_log_targets, true)
|
||||||
|
|
||||||
file { $ay_main_file:
|
file { $ay_main_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
selrange => s0,
|
selrange => s0,
|
||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('cd_alloy/config.alloy.erb'),
|
content => template('cd_alloy/config.alloy.erb'),
|
||||||
notify => Service[$ay_service],
|
notify => Service[$ay_service],
|
||||||
}
|
}
|
||||||
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class manages module logic for the cd_alloy module
|
Class installs packages for the cd_alloy module
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
@@ -109,8 +109,7 @@
|
|||||||
11
|
11
|
||||||
12
|
12
|
||||||
13
|
13
|
||||||
14
|
14</pre>
|
||||||
15</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 6</span>
|
||||||
@@ -118,7 +117,6 @@
|
|||||||
class cd_alloy::main::install (
|
class cd_alloy::main::install (
|
||||||
|
|
||||||
) inherits cd_alloy::params {
|
) inherits cd_alloy::params {
|
||||||
|
|
||||||
require cd_alloy::main::yumrepo
|
require cd_alloy::main::yumrepo
|
||||||
|
|
||||||
package { $reqpackages:
|
package { $reqpackages:
|
||||||
|
|||||||
@@ -112,8 +112,7 @@
|
|||||||
14
|
14
|
||||||
15
|
15
|
||||||
16
|
16
|
||||||
17
|
17</pre>
|
||||||
18</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 6</span>
|
||||||
@@ -121,14 +120,13 @@
|
|||||||
class cd_alloy::main::service (
|
class cd_alloy::main::service (
|
||||||
|
|
||||||
) inherits cd_alloy::params {
|
) inherits cd_alloy::params {
|
||||||
|
|
||||||
require cd_alloy::main::files
|
require cd_alloy::main::files
|
||||||
|
|
||||||
service { $ay_service:
|
service { $ay_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
enable => true,
|
enable => true,
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
<span class='name'>reqpackages</span>
|
<span class='name'>reqpackages</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>string</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'alloy'</tt>)</em>
|
<em class="default">(defaults to: <tt>'alloy'</tt>)</em>
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<span class='name'>pkg_ensure</span>
|
<span class='name'>pkg_ensure</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>string</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'latest'</tt>)</em>
|
<em class="default">(defaults to: <tt>'latest'</tt>)</em>
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
<span class='name'>ay_loki_url</span>
|
<span class='name'>ay_loki_url</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>string</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'https://loki.example.net/loki/api/v1/push'</tt>)</em>
|
<em class="default">(defaults to: <tt>'https://loki.example.net/loki/api/v1/push'</tt>)</em>
|
||||||
@@ -167,10 +167,10 @@
|
|||||||
<span class='name'>ay_loki_username</span>
|
<span class='name'>ay_loki_username</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>string</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>''</tt>)</em>
|
<em class="default">(defaults to: <tt>'loki_user'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
—
|
—
|
||||||
@@ -185,10 +185,10 @@
|
|||||||
<span class='name'>ay_loki_userpass</span>
|
<span class='name'>ay_loki_userpass</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>string</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>''</tt>)</em>
|
<em class="default">(defaults to: <tt>'loki_pass'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
—
|
—
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
<span class='name'>ay_manage_loki</span>
|
<span class='name'>ay_manage_loki</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>boolean</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>true</tt>)</em>
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
<span class='name'>ay_manage_prom</span>
|
<span class='name'>ay_manage_prom</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>boolean</tt>)</span>
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>true</tt>)</em>
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
<span class='name'>ay_prom_url</span>
|
<span class='name'>ay_prom_url</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>string</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'https://prometheus.example.net/api/v1/write'</tt>)</em>
|
<em class="default">(defaults to: <tt>'https://prometheus.example.net/api/v1/write'</tt>)</em>
|
||||||
@@ -257,12 +257,17 @@
|
|||||||
<span class='name'>ay_log_targets</span>
|
<span class='name'>ay_log_targets</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Any</tt>)</span>
|
<span class='type'>(<tt>Array</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>['/var/log/messages','/var/log/secure',]</tt>)</em>
|
<em class="default">(defaults to: <tt>['/var/log/messages','/var/log/secure',]</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the logging targets</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -276,7 +281,6 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
14
|
|
||||||
15
|
15
|
||||||
16
|
16
|
||||||
17
|
17
|
||||||
@@ -305,44 +309,39 @@
|
|||||||
40
|
40
|
||||||
41
|
41
|
||||||
42
|
42
|
||||||
43
|
43</pre>
|
||||||
44
|
|
||||||
45</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 14</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 15</span>
|
||||||
|
|
||||||
class cd_alloy::params (
|
class cd_alloy::params (
|
||||||
|
|
||||||
$reqpackages = 'alloy',
|
String $reqpackages = 'alloy',
|
||||||
$pkg_ensure = 'latest',
|
String $pkg_ensure = 'latest',
|
||||||
|
|
||||||
# loki
|
# loki
|
||||||
$ay_manage_loki = true,
|
String $ay_manage_loki = true,
|
||||||
$ay_loki_url = 'https://loki.example.net/loki/api/v1/push',
|
String $ay_loki_url = 'https://loki.example.net/loki/api/v1/push',
|
||||||
$ay_loki_username = '',
|
String $ay_loki_username = 'loki_user',
|
||||||
$ay_loki_userpass = '',
|
String $ay_loki_userpass = 'loki_pass',
|
||||||
$ay_log_targets = ['/var/log/messages','/var/log/secure',],
|
Array $ay_log_targets = ['/var/log/messages','/var/log/secure',],
|
||||||
|
|
||||||
# prometheus
|
# prometheus
|
||||||
$ay_manage_prom = true,
|
Boolean $ay_manage_prom = true,
|
||||||
$ay_prom_url = 'https://prometheus.example.net/api/v1/write',
|
String $ay_prom_url = 'https://prometheus.example.net/api/v1/write',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
# service
|
||||||
|
$ay_service = 'alloy'
|
||||||
|
|
||||||
# service
|
# dirs
|
||||||
$ay_service = 'alloy'
|
$ay_main_dir = '/etc/alloy'
|
||||||
|
|
||||||
# dirs
|
|
||||||
$ay_main_dir = '/etc/alloy'
|
|
||||||
|
|
||||||
# files
|
|
||||||
$ay_main_file = "${ay_main_dir}/config.alloy"
|
|
||||||
|
|
||||||
|
# files
|
||||||
|
$ay_main_file = "${ay_main_dir}/config.alloy"
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include cd_alloy::main::config
|
include cd_alloy::main::config
|
||||||
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user