3
0

Recommit for updates in build 63

This commit is contained in:
2025-12-04 14:17:17 +01:00
parent eeffaa96e5
commit e764267826
4 changed files with 130 additions and 8 deletions

View File

@@ -104,7 +104,13 @@
6 6
7 7
8 8
9</pre> 9
10
11
12
13
14
15</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>
@@ -112,6 +118,12 @@
class prometheus_cd::main::config ( class prometheus_cd::main::config (
) inherits prometheus_cd::params { ) inherits prometheus_cd::params {
include prometheus_cd::main::service include prometheus_cd::main::service
exec { &#39;systemd-daemon-reload&#39;:
command =&gt; &#39;/bin/systemctl daemon-reload&#39;,
path =&gt; [&#39;/bin&#39;, &#39;/usr/bin&#39;],
refreshonly =&gt; true,
}
}</pre> }</pre>
</td> </td>
</tr> </tr>

View File

@@ -179,7 +179,33 @@
81 81
82 82
83 83
84</pre> 84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110</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>
@@ -247,18 +273,44 @@ class prometheus_cd::main::files (
seltype =&gt; usr_, seltype =&gt; usr_,
seluser =&gt; unconfined_u, seluser =&gt; unconfined_u,
content =&gt; template(&#39;prometheus_cd/prune.env.erb&#39;), content =&gt; template(&#39;prometheus_cd/prune.env.erb&#39;),
# notify Service ToDo, }
file { $ps_pruning_svc_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/prometheus-prune-service.erb&#39;),
notify =&gt; Exec[&#39;systemd-daemon-reload&#39;],
}
file { $ps_pruning_timer_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/prometheus-prune-timer.erb&#39;),
notify =&gt; Exec[&#39;systemd-daemon-reload&#39;],
} }
} }
if $ps_enable_pruning == false { if $ps_enable_pruning == false {
file { $ps_pruning_file: file { $ps_pruning_file:
ensure =&gt; absent, ensure =&gt; absent,
# notify Service ToDo, notify =&gt; Exec[&#39;systemd-daemon-reload&#39;],
} }
file { $ps_env_file: file { $ps_env_file:
ensure =&gt; absent, ensure =&gt; absent,
# notify Service ToDo, }
file { $ps_pruning_svc_file:
ensure =&gt; absent,
notify =&gt; Exec[&#39;systemd-daemon-reload&#39;],
} }
} }
} }

View File

@@ -121,7 +121,31 @@
23 23
24 24
25 25
26</pre> 26
27
28
29
30
31
32
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/service.pp', line 6</span> <pre class="code"><span class="info file"># File 'manifests/main/service.pp', line 6</span>
@@ -146,6 +170,30 @@ class prometheus_cd::main::service (
enable =&gt; true, enable =&gt; true,
} }
} }
if $ps_enable_pruning == true {
service { $ps_prune_service:
ensure =&gt; running,
hasstatus =&gt; true,
hasrestart =&gt; true,
enable =&gt; true,
}
service { $ps_prune_timer:
ensure =&gt; running,
hasstatus =&gt; true,
hasrestart =&gt; true,
enable =&gt; true,
}
}
if $ps_enable_pruning == false {
service { $ps_prune_service:
ensure =&gt; stopped,
enable =&gt; true,
}
service { $ps_prune_timer:
ensure =&gt; stopped,
enable =&gt; true,
}
}
}</pre> }</pre>
</td> </td>
</tr> </tr>

View File

@@ -885,7 +885,12 @@
121 121
122 122
123 123
124</pre> 124
125
126
127
128
129</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 44</span> <pre class="code"><span class="info file"># File 'manifests/params.pp', line 44</span>
@@ -958,15 +963,20 @@ class prometheus_cd::params (
# dirs # dirs
$ps_main_dir = &#39;/etc/prometheus&#39; $ps_main_dir = &#39;/etc/prometheus&#39;
$ps_system_file_dir = &#39;/etc/systemd/system/prometheus.service.d&#39; $ps_system_file_dir = &#39;/etc/systemd/system/prometheus.service.d&#39;
$ps_system_dir = &#39;/etc/systemd/system/&#39;
# files # files
$ps_main_file = &quot;${ps_main_dir}/prometheus.yml&quot; $ps_main_file = &quot;${ps_main_dir}/prometheus.yml&quot;
$ps_web_config_file = &quot;${ps_main_dir}/web.yml&quot; $ps_web_config_file = &quot;${ps_main_dir}/web.yml&quot;
$ps_system_service_file = &quot;${ps_system_file_dir}/override.conf&quot; $ps_system_service_file = &quot;${ps_system_file_dir}/override.conf&quot;
$ps_pruning_svc_file = &quot;${ps_system_dir}/prometheus-prune.service&quot;
$ps_pruning_timer_file = &quot;${ps_system_dir}/prometheus-prune.timer&quot;
# services # services
$ps_prom_service = &#39;prometheus&#39; $ps_prom_service = &#39;prometheus&#39;
$ps_ne_service = &#39;node_exporter&#39; $ps_ne_service = &#39;node_exporter&#39;
$ps_prune_service = &#39;prometheus-prune.service&#39;
$ps_prune_timer = &#39;prometheus-prune.timer&#39;
# includes must be last # includes must be last
include prometheus_cd::main::config include prometheus_cd::main::config