3
0

Recommit for updates in build 55

This commit is contained in:
2025-12-04 12:00:56 +01:00
parent 0b1934a360
commit cbbcd14158
2 changed files with 66 additions and 8 deletions

View File

@@ -128,7 +128,24 @@
30 30
31 31
32 32
33</pre> 33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50</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>
@@ -136,7 +153,7 @@
class prometheus_cd::main::dirs ( class prometheus_cd::main::dirs (
) inherits prometheus_cd::params { ) inherits prometheus_cd::params {
require prometheus_cd::main::install require prometheus_cd::main::install
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) { if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
# prometheus directory # prometheus directory
file { $ps_main_dir: file { $ps_main_dir:
ensure =&gt; directory, ensure =&gt; directory,
@@ -148,7 +165,7 @@ class prometheus_cd::main::dirs (
seltype =&gt; etc_t, seltype =&gt; etc_t,
seluser =&gt; system_u, seluser =&gt; system_u,
} }
# service systemfile directory # service system file directory
file { $ps_system_file_dir: file { $ps_system_file_dir:
ensure =&gt; directory, ensure =&gt; directory,
owner =&gt; &#39;root&#39;, owner =&gt; &#39;root&#39;,
@@ -159,6 +176,23 @@ class prometheus_cd::main::dirs (
seltype =&gt; systemd_unit_file_t, seltype =&gt; systemd_unit_file_t,
seluser =&gt; unconfined_u, seluser =&gt; unconfined_u,
} }
if $ps_write_external == true {
file { $ps_pruning_dir:
ensure =&gt; directory,
owner =&gt; &#39;prometheus&#39;,
group =&gt; &#39;prometheus&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_,
seluser =&gt; unconfined_u,
}
}
if $ps_write_external == false {
file { $ps_pruning_dir:
ensure =&gt; absent,
}
}
} }
}</pre> }</pre>
</td> </td>

View File

@@ -568,12 +568,30 @@
<span class='type'>(<tt>String</tt>)</span> <span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;http://change.local&#39;</tt>)</em> <em class="default">(defaults to: <tt>&#39;http://changeme.local/write&#39;</tt>)</em>
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>the full url for the remote write point</p> <p>the full url for the remote write point</p>
</div>
</li>
<li>
<span class='name'>ps_pruning_dir</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;/opt/prometheus-prune&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the directory for the pruning script</p>
</div> </div>
</li> </li>
@@ -589,7 +607,6 @@
<pre class="lines"> <pre class="lines">
32
33 33
34 34
35 35
@@ -655,10 +672,14 @@
95 95
96 96
97 97
98</pre> 98
99
100
101
102</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 32</span> <pre class="code"><span class="info file"># File 'manifests/params.pp', line 33</span>
class prometheus_cd::params ( class prometheus_cd::params (
@@ -702,7 +723,10 @@ class prometheus_cd::params (
# remote write external # remote write external
Boolean $ps_write_external = false, Boolean $ps_write_external = false,
String $ps_external_url = &#39;http://change.local&#39;, String $ps_external_url = &#39;http://changeme.local/write&#39;,
# pruning script
String $ps_pruning_dir = &#39;/opt/prometheus-prune&#39;
) { ) {
# defaults # defaults