Recommit for updates in build 14

This commit is contained in:
Jenkins Server
2026-02-13 14:58:04 +01:00
parent f372b9d159
commit de19743197
5 changed files with 56 additions and 86 deletions

View File

@@ -289,18 +289,7 @@
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205</pre>
194</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
@@ -308,8 +297,48 @@
class confdroid_nagios::main::dirs (
) inherits confdroid_nagios::params {
require confdroid_nagios::main::user
if $ng_nagios_server == $fqdn {
require cd_nagios::main::user
# main directory
file { $ng_main_dir:
ensure =&gt; directory,
path =&gt; $ng_main_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /usr/lib64/nagios dir required for plugins
file { $ng_lib_dir:
ensure =&gt; directory,
path =&gt; $ng_lib_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; lib_t,
seluser =&gt; system_u,
}
# /var/spool/nagios
file { $ng_spool_dir:
ensure =&gt; directory,
path =&gt; $ng_spool_dir,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_spool_t,
seluser =&gt; system_u,
}
if $fqdn == $ng_nagios_server {
# /etc/nagios/conf.d
file { $ng_conf_d_dir:
ensure =&gt; directory,
@@ -324,7 +353,6 @@ class confdroid_nagios::main::dirs (
}
# /etc/nagios/objects
file { $ng_objects_dir:
ensure =&gt; directory,
path =&gt; $ng_objects_dir,
@@ -338,7 +366,6 @@ class confdroid_nagios::main::dirs (
}
# /etc/nagios/private
file { $ng_private_dir:
ensure =&gt; directory,
path =&gt; $ng_private_dir,
@@ -349,10 +376,9 @@ class confdroid_nagios::main::dirs (
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
}
# include dir
file { $ng_usr_incl:
ensure =&gt; directory,
path =&gt; $ng_usr_incl,
@@ -366,7 +392,6 @@ class confdroid_nagios::main::dirs (
}
# log dir
file { $ng_log_dir:
ensure =&gt; directory,
path =&gt; $ng_log_dir,
@@ -380,7 +405,6 @@ class confdroid_nagios::main::dirs (
}
# log archives
file { $ng_log_archives:
ensure =&gt; directory,
path =&gt; $ng_log_archives,
@@ -394,7 +418,6 @@ class confdroid_nagios::main::dirs (
}
# /usr/share/nagios
file { $ng_usr_share:
ensure =&gt; directory,
path =&gt; $ng_usr_share,
@@ -408,7 +431,6 @@ class confdroid_nagios::main::dirs (
}
# /usr/share/nagios/html
file { $ng_share_html:
ensure =&gt; directory,
path =&gt; $ng_share_html,
@@ -422,7 +444,6 @@ class confdroid_nagios::main::dirs (
}
# run dir for pid file
file { $ng_run_dir:
ensure =&gt; directory,
path =&gt; $ng_run_dir,
@@ -436,7 +457,6 @@ class confdroid_nagios::main::dirs (
}
# cmd dir
file { $ng_cmd_dir:
ensure =&gt; directory,
path =&gt; $ng_cmd_dir,
@@ -450,7 +470,6 @@ class confdroid_nagios::main::dirs (
}
# checkresults dir
file { $ng_checkresults_dir:
ensure =&gt; directory,
path =&gt; $ng_checkresults_dir,
@@ -463,47 +482,6 @@ class confdroid_nagios::main::dirs (
seluser =&gt; system_u,
}
}
else {
file { $ng_main_dir:
ensure =&gt; directory,
path =&gt; $ng_main_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /usr/lib64/nagios dir required for plugins
file { $ng_lib_dir:
ensure =&gt; directory,
path =&gt; $ng_lib_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; lib_t,
seluser =&gt; system_u,
}
# /var/spool/nagios
file { $ng_spool_dir:
ensure =&gt; directory,
path =&gt; $ng_spool_dir,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_spool_t,
seluser =&gt; system_u,
}
}
}</pre>
</td>
</tr>

View File

@@ -129,10 +129,7 @@
31
32
33
34
35
36
37</pre>
34</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 6</span>
@@ -143,8 +140,7 @@ class confdroid_nagios::main::install (
if $ng_nagios_server == $fqdn {
require confdroid_resources
# if our FQDN matches the configured Nagios server FQDN, install both server-
# and client packages.
# we&#39;ll need httpd installed
# and client packages.We&#39;ll need httpd installed
require confdroid_apache
package { $ng_reqpackages_server:
@@ -156,14 +152,12 @@ class confdroid_nagios::main::install (
}
# if we are not the nagios server, install only client packages
if $fqdn != $ng_nagios_server {
package { $reqpackages_client:
ensure =&gt; $pkg_ensure,
}
# if we want to use NRPE, install it
# if we want to use NRPE on clients, install it
if $ng_include_nrpe == true {
require cd_nrpe
}

View File

@@ -127,8 +127,7 @@
29
30
31
32
33</pre>
32</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/user.pp', line 6</span>
@@ -136,15 +135,14 @@
class confdroid_nagios::main::user (
) inherits confdroid_nagios::params {
require confdroid_nagios::main::install
if $ng_nagios_server == $fqdn {
require confdroid_nagios::main::install
group { $ng_user:
ensure =&gt; present,
name =&gt; $ng_user,
gid =&gt; $ng_u_uid,
allowdupe =&gt; false,
}
ensure =&gt; present,
name =&gt; $ng_user,
gid =&gt; $ng_u_uid,
allowdupe =&gt; false,
}
user { $ng_user:
ensure =&gt; present,

View File

@@ -116,8 +116,8 @@
class confdroid_nagios::server::files (
) inherits confdroid_nagios::params {
require confdroid_nagios::main::dirs
if $ng_nagios_server == $fqdn {
require confdroid_nagios::main::dirs
#config here
}
}</pre>

View File

@@ -116,8 +116,8 @@
class confdroid_nagios::server::service (
) inherits confdroid_nagios::params {
require confdroid_nagios::server::files
if $ng_nagios_server == $fqdn {
require confdroid_nagios::server::files
#config here
}
}</pre>