Merge branch 'jenkins' into 'master'

Jenkins

See merge request !38
This commit is contained in:
12ww1160
2017-07-23 14:20:41 +02:00
24 changed files with 162 additions and 170 deletions

View File

@@ -8,6 +8,16 @@ Changelog of Git Changelog.
<h2> No issue </h2> <h2> No issue </h2>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/f8530f8c1ae8a22">f8530f8c1ae8a22</a> Jenkins Server <i>2017-07-23 11:49:19</i>
<p>
<h3>recommit for updates in build 61</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/382b1988f25b19b">382b1988f25b19b</a> Arne Teuke <i>2017-07-23 11:49:04</i>
<p>
<h3>added nagios directories</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/9920bc9caa7325b">9920bc9caa7325b</a> Jenkins Server <i>2017-07-23 11:38:25</i> <a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/9920bc9caa7325b">9920bc9caa7325b</a> Jenkins Server <i>2017-07-23 11:38:25</i>
<p> <p>
<h3>recommit for updates in build 60</h3> <h3>recommit for updates in build 60</h3>

View File

@@ -62,8 +62,7 @@
| | |-- forward_conf.erb | | |-- forward_conf.erb
| | |-- index_html.erb | | |-- index_html.erb
| | |-- nagios_conf.erb | | |-- nagios_conf.erb
| | |-- nagios_ssl_vhost.erb | | `-- nagios_ssl_vhost.erb
| | `-- welcome_conf.erb
| |-- nagios | |-- nagios
| | |-- cgi_cfg.erb | | |-- cgi_cfg.erb
| | `-- htpasswd_rule.erb | | `-- htpasswd_rule.erb
@@ -80,4 +79,4 @@
|-- README.md |-- README.md
`-- REPOSTRUCTURE.md `-- REPOSTRUCTURE.md
18 directories, 62 files 18 directories, 61 files

View File

@@ -186,7 +186,7 @@
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:13 2017 by Generated on Sun Jul 23 14:28:40 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -326,7 +326,7 @@ environments.</p>
</div></div> </div></div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:15 2017 by Generated on Sun Jul 23 14:28:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -326,7 +326,7 @@ environments.</p>
</div></div> </div></div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:14 2017 by Generated on Sun Jul 23 14:28:41 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -139,7 +139,7 @@ class cd_nagios {
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:15 2017 by Generated on Sun Jul 23 14:28:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -230,7 +230,7 @@ class cd_nagios::certbot::certs (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -368,7 +368,7 @@ class cd_nagios::client::target (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:17 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:17 2017 by Generated on Sun Jul 23 14:28:44 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -195,7 +195,7 @@ class cd_nagios::main::config (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -468,7 +468,7 @@ class cd_nagios::main::dirs (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -235,7 +235,7 @@ class cd_nagios::main::install (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -200,7 +200,7 @@ class cd_nagios::main::user (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -2356,7 +2356,7 @@ $ng_certbot_live = &quot;${ng_certbot_main_dir}/live&quot;
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -249,7 +249,7 @@ class cd_nagios::selinux::config (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:17 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:17 2017 by Generated on Sun Jul 23 14:28:44 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -220,32 +220,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
111 111
112 112
113 113
114 114</pre>
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span> <pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span>
@@ -283,55 +258,21 @@ class cd_nagios::server::files (
notify =&gt; Service[$ng_service], notify =&gt; Service[$ng_service],
} }
# manage nagios.conf for httpd # # manage nagios.conf for httpd
file { $ng_nagios_conf: # file { $ng_nagios_conf:
ensure =&gt; file, # ensure =&gt; file,
path =&gt; $ng_nagios_conf, # path =&gt; $ng_nagios_conf,
owner =&gt; &#39;root&#39;, # owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;, # group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;, # mode =&gt; &#39;0644&#39;,
selrange =&gt; s0, # selrange =&gt; s0,
selrole =&gt; object_r, # selrole =&gt; object_r,
seltype =&gt; httpd_config_t, # seltype =&gt; httpd_config_t,
seluser =&gt; system_u, # seluser =&gt; system_u,
content =&gt; template($ng_nagios_conf_erb), # content =&gt; template($ng_nagios_conf_erb),
notify =&gt; Service[$ae_service], # notify =&gt; Service[$ae_service],
} # }
# manage welcome.conf for nagios web server
file { $ng_welcome_conf:
ensure =&gt; file,
path =&gt; $ng_welcome_conf,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; httpd_config_t,
seluser =&gt; system_u,
content =&gt; template($ng_welcome_conf_erb),
notify =&gt; Service[$ae_service],
}
if $ng_use_https == true {
file { $ng_ssl_vhost_file:
ensure =&gt; file,
path =&gt; $ng_ssl_vhost_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; httpd_config_t,
seluser =&gt; system_u,
content =&gt; template($ng_ssl_vhost_erb),
notify =&gt; Service[$ae_service],
}
if $ng_http_https_fw == true {
file { $ng_forward_conf: file { $ng_forward_conf:
ensure =&gt; file, ensure =&gt; file,
@@ -346,25 +287,34 @@ class cd_nagios::server::files (
content =&gt; template($ng_forward_conf_erb), content =&gt; template($ng_forward_conf_erb),
notify =&gt; Service[$ae_service], notify =&gt; Service[$ae_service],
} }
}
}
if $ng_enable_index == true { if $ng_use_https == true {
file { $ng_index_html_file: # create ssl vhost
file { $ng_ssl_vhost_file:
ensure =&gt; file, ensure =&gt; file,
path =&gt; $ng_index_html_file, path =&gt; $ng_ssl_vhost_file,
owner =&gt; &#39;root&#39;, owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;, group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;, mode =&gt; &#39;0644&#39;,
selrange =&gt; s0, selrange =&gt; s0,
selrole =&gt; object_r, selrole =&gt; object_r,
seltype =&gt; httpd_sys_content_t, seltype =&gt; httpd_config_t,
seluser =&gt; system_u, seluser =&gt; system_u,
content =&gt; template($ng_index_html_erb), content =&gt; template($ng_ssl_vhost_erb),
notify =&gt; Service[$ae_service], notify =&gt; Service[$ae_service],
} }
} }
if $ng_use_https != true {
# remove ssl_vhost
file { $ng_ssl_vhost_file:
ensure =&gt; absent,
}
}
} }
}</pre> }</pre>
</td> </td>
@@ -374,7 +324,7 @@ class cd_nagios::server::files (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:16 2017 by Generated on Sun Jul 23 14:28:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -174,7 +174,7 @@ class cd_nagios::server::service (
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:17 2017 by Generated on Sun Jul 23 14:28:44 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -220,7 +220,7 @@ $ng_service = $::cd_nagios::params::ng_service
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:17 2017 by Generated on Sun Jul 23 14:28:44 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -90,7 +90,7 @@
</div> </div>
<div id="footer"> <div id="footer">
Generated on Sun Jul 23 13:49:15 2017 by Generated on Sun Jul 23 14:28:42 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0). 0.9.9 (ruby-2.0.0).
</div> </div>

View File

@@ -53,55 +53,21 @@ class cd_nagios::server::files (
notify => Service[$ng_service], notify => Service[$ng_service],
} }
# manage nagios.conf for httpd # # manage nagios.conf for httpd
file { $ng_nagios_conf: # file { $ng_nagios_conf:
ensure => file, # ensure => file,
path => $ng_nagios_conf, # path => $ng_nagios_conf,
owner => 'root', # owner => 'root',
group => 'root', # group => 'root',
mode => '0644', # mode => '0644',
selrange => s0, # selrange => s0,
selrole => object_r, # selrole => object_r,
seltype => httpd_config_t, # seltype => httpd_config_t,
seluser => system_u, # seluser => system_u,
content => template($ng_nagios_conf_erb), # content => template($ng_nagios_conf_erb),
notify => Service[$ae_service], # notify => Service[$ae_service],
} # }
# manage welcome.conf for nagios web server
file { $ng_welcome_conf:
ensure => file,
path => $ng_welcome_conf,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_welcome_conf_erb),
notify => Service[$ae_service],
}
if $ng_use_https == true {
file { $ng_ssl_vhost_file:
ensure => file,
path => $ng_ssl_vhost_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_ssl_vhost_erb),
notify => Service[$ae_service],
}
if $ng_http_https_fw == true {
file { $ng_forward_conf: file { $ng_forward_conf:
ensure => file, ensure => file,
@@ -116,24 +82,33 @@ class cd_nagios::server::files (
content => template($ng_forward_conf_erb), content => template($ng_forward_conf_erb),
notify => Service[$ae_service], notify => Service[$ae_service],
} }
}
}
if $ng_enable_index == true { if $ng_use_https == true {
file { $ng_index_html_file: # create ssl vhost
file { $ng_ssl_vhost_file:
ensure => file, ensure => file,
path => $ng_index_html_file, path => $ng_ssl_vhost_file,
owner => 'root', owner => 'root',
group => 'root', group => 'root',
mode => '0644', mode => '0644',
selrange => s0, selrange => s0,
selrole => object_r, selrole => object_r,
seltype => httpd_sys_content_t, seltype => httpd_config_t,
seluser => system_u, seluser => system_u,
content => template($ng_index_html_erb), content => template($ng_ssl_vhost_erb),
notify => Service[$ae_service], notify => Service[$ae_service],
} }
} }
if $ng_use_https != true {
# remove ssl_vhost
file { $ng_ssl_vhost_file:
ensure => absent,
}
}
} }
} }

View File

@@ -7,7 +7,85 @@
Redirect permanent / https://<%= @ng_webserver_name %>/nagios Redirect permanent / https://<%= @ng_webserver_name %>/nagios
<% end -%> <% end -%>
<% if @ng_use_https != true -%> <% if @ng_use_https != true -%>
Redirect permanent / http://<%= @ng_webserver_name %>/nagios ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<Directory "/usr/lib64/nagios/cgi-bin/">
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
<% end -%>
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Require ip <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
<% unless @ng_required_hosts.empty? -%>
Allow from <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Allow from <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</IfVersion>
</Directory>
Alias /nagios "/usr/share/nagios/html"
<Directory "/usr/share/nagios/html">
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
<% end -%>
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Require ip <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
<% unless @ng_required_hosts.empty? -%>
Allow from <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Allow from <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</IfVersion>
</Directory>
<% end -%> <% end -%>
<Directory /> <Directory />
AllowOverride All AllowOverride All

View File

@@ -2,12 +2,12 @@
##### virtual_host file created by puppet, changes will be overwritten ###### ##### virtual_host file created by puppet, changes will be overwritten ######
############################################################################### ###############################################################################
<VirtualHost *:443> <VirtualHost *:<%= @ng_https_port %>>
ServerAdmin root@localhost ServerAdmin root@localhost
DocumentRoot /var/www/html DocumentRoot /var/www/html
ServerName <%= @ng_webserver_name %> ServerName <%= @ng_webserver_name %>
DirectoryIndex index.html ServerAlias <%= @ng_webserver_name %>
ErrorLog /var/log/httpd/nagios_ssl_error_log ErrorLog /var/log/httpd/nagios_ssl_error_log
# ErrorLog syslog:local1 # ErrorLog syslog:local1
TransferLog /var/log/httpd/nagios_ssl_transfer_log TransferLog /var/log/httpd/nagios_ssl_transfer_log

View File

@@ -1,20 +0,0 @@
################################################################################
########### welcome.conf generated by Puppet ##########
########### manual changes will be overwritten !!! ##########
################################################################################
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /.noindex.html
</LocationMatch>
<Directory /usr/share/httpd/noindex>
AllowOverride None
Require all granted
</Directory>
Alias /.noindex.html /usr/share/httpd/noindex/index.html
Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png