3
0

Recommit for updates in build 26

This commit is contained in:
2025-10-18 15:30:37 +02:00
parent 05c1054486
commit ede5319ac4
5 changed files with 56 additions and 10 deletions

View File

@@ -117,7 +117,18 @@
19
20
21
22</pre>
22
23
24
25
26
27
28
29
30
31
32
33</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
@@ -126,7 +137,7 @@ class prometheus_cd::main::dirs (
) inherits prometheus_cd::params {
require prometheus_cd::main::install
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
# prometheus directors
# prometheus directory
file { $ps_main_dir:
ensure =&gt; directory,
owner =&gt; &#39;root&#39;,
@@ -137,6 +148,17 @@ class prometheus_cd::main::dirs (
seltype =&gt; etc_t,
seluser =&gt; system_u,
}
# service systemfile directory
file { $ps_system_file_dir:
ensure =&gt; directory,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; systemd_unit_file_t,
seluser =&gt; unconfined_u,
}
}
}</pre>
</td>

View File

@@ -118,15 +118,27 @@
20
21
22
23</pre>
23
24
25
26
27
28
29
30
31
32
33
34
35</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
class prometheus_cd::main::files (
) inherits prometheus_cd::params {
require prometheus_cd::main::dirs
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
if ($ps_prom_host == $fqdn) and ($manage_prometheus == true) {
require prometheus_cd::main::dirs
file { $ps_main_file:
ensure =&gt; file,
owner =&gt; &#39;root&#39;,
@@ -139,6 +151,18 @@ class prometheus_cd::main::files (
content =&gt; template(&#39;prometheus_cd/prometheus.yml.erb&#39;),
notify =&gt; Service[$ps_prom_service],
}
file { $ps_system_service_file:
ensure =&gt; file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; systemd_unit_file_t,
seluser =&gt; unconfined_u,
content =&gt; template(&#39;prometheus_cd/override.conf.erb&#39;),
notify =&gt; Service[$ps_prom_service],
}
}
}</pre>
</td>

View File

@@ -359,7 +359,9 @@
54
55
56
57</pre>
57
58
59</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 17</span>
@@ -394,9 +396,11 @@ class prometheus_cd::params (
# dirs
$ps_main_dir = &#39;/etc/prometheus&#39;
$ps_system_file_dir = &#39;/etc/systemd/system/prometheus.service.d&#39;
# files
$ps_main_file = &quot;${ps_main_dir}/prometheus.yml&quot;
$ps_system_service_file = &quot;${ps_system_file_dir}/override.conf&quot;
# services
$ps_prom_service = &#39;prometheus&#39;