Recommit for updates in build 16
This commit is contained in:
@@ -104,7 +104,19 @@
|
|||||||
6
|
6
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
9</pre>
|
9
|
||||||
|
10
|
||||||
|
11
|
||||||
|
12
|
||||||
|
13
|
||||||
|
14
|
||||||
|
15
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
19
|
||||||
|
20
|
||||||
|
21</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>
|
||||||
@@ -112,6 +124,18 @@
|
|||||||
class prometheus_cd::main::files (
|
class prometheus_cd::main::files (
|
||||||
) inherits prometheus_cd::params {
|
) inherits prometheus_cd::params {
|
||||||
require prometheus_cd::main::dirs
|
require prometheus_cd::main::dirs
|
||||||
|
file { $ps_main_file:
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
selrange => s0,
|
||||||
|
selrole => object_r,
|
||||||
|
seltype => etc_t,
|
||||||
|
seluser => system_u,
|
||||||
|
content => template('prometheus_cd/prometheus.yml.erb'),
|
||||||
|
notify => Service[ps_prom_service],
|
||||||
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class prometheus_cd::main::service (
|
|||||||
require prometheus_cd::main::files
|
require prometheus_cd::main::files
|
||||||
require prometheus_cd::firewall::iptables
|
require prometheus_cd::firewall::iptables
|
||||||
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
|
||||||
service { 'prometheus':
|
service { $ps_prom_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
@@ -139,7 +139,7 @@ class prometheus_cd::main::service (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if $manage_node_exporter == true {
|
if $manage_node_exporter == true {
|
||||||
service { 'node_exporter':
|
service { $ps_ne_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
|
|||||||
@@ -272,6 +272,55 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_auth_user</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'changeme'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the username for authentication</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_auth_user</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'changeme'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the password for authentication</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>ps_auth_pass</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'changeme'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@@ -283,8 +332,6 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
17
|
||||||
18
|
18
|
||||||
19
|
19
|
||||||
@@ -312,10 +359,21 @@
|
|||||||
41
|
41
|
||||||
42
|
42
|
||||||
43
|
43
|
||||||
44</pre>
|
44
|
||||||
|
45
|
||||||
|
46
|
||||||
|
47
|
||||||
|
48
|
||||||
|
49
|
||||||
|
50
|
||||||
|
51
|
||||||
|
52
|
||||||
|
53
|
||||||
|
54
|
||||||
|
55</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 15</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 17</span>
|
||||||
|
|
||||||
class prometheus_cd::params (
|
class prometheus_cd::params (
|
||||||
|
|
||||||
@@ -334,6 +392,10 @@ class prometheus_cd::params (
|
|||||||
String $ps_fw_prefix = '50',
|
String $ps_fw_prefix = '50',
|
||||||
String $ps_main_port = '9090',
|
String $ps_main_port = '9090',
|
||||||
|
|
||||||
|
# auth
|
||||||
|
String $ps_auth_user = 'changeme',
|
||||||
|
String $ps_auth_pass = 'changeme',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# defaults
|
# defaults
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
@@ -344,6 +406,11 @@ class prometheus_cd::params (
|
|||||||
# dirs
|
# dirs
|
||||||
$ps_main_dir = '/etc/prometheus'
|
$ps_main_dir = '/etc/prometheus'
|
||||||
|
|
||||||
|
# files
|
||||||
|
|
||||||
|
# services
|
||||||
|
$ps_prom_service = 'prometheus'
|
||||||
|
$ps_ne_service = 'node_exporter'
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include prometheus_cd::main::config
|
include prometheus_cd::main::config
|
||||||
}</pre>
|
}</pre>
|
||||||
|
|||||||
Reference in New Issue
Block a user