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>
<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>
<p>
<h3>recommit for updates in build 60</h3>

View File

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

View File

@@ -186,7 +186,7 @@
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -326,7 +326,7 @@ environments.</p>
</div></div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -326,7 +326,7 @@ environments.</p>
</div></div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -139,7 +139,7 @@ class cd_nagios {
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -230,7 +230,7 @@ class cd_nagios::certbot::certs (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -368,7 +368,7 @@ class cd_nagios::client::target (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -195,7 +195,7 @@ class cd_nagios::main::config (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -468,7 +468,7 @@ class cd_nagios::main::dirs (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -235,7 +235,7 @@ class cd_nagios::main::install (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -200,7 +200,7 @@ class cd_nagios::main::user (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -2356,7 +2356,7 @@ $ng_certbot_live = &quot;${ng_certbot_main_dir}/live&quot;
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -249,7 +249,7 @@ class cd_nagios::selinux::config (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -220,32 +220,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
111
112
113
114
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>
114</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span>
@@ -283,11 +258,25 @@ class cd_nagios::server::files (
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,
# path =&gt; $ng_nagios_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_nagios_conf_erb),
# notify =&gt; Service[$ae_service],
# }
file { $ng_forward_conf:
ensure =&gt; file,
path =&gt; $ng_nagios_conf,
path =&gt; $ng_forward_conf,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
@@ -295,28 +284,14 @@ class cd_nagios::server::files (
selrole =&gt; object_r,
seltype =&gt; httpd_config_t,
seluser =&gt; system_u,
content =&gt; template($ng_nagios_conf_erb),
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),
content =&gt; template($ng_forward_conf_erb),
notify =&gt; Service[$ae_service],
}
if $ng_use_https == true {
# create ssl vhost
file { $ng_ssl_vhost_file:
ensure =&gt; file,
path =&gt; $ng_ssl_vhost_file,
@@ -330,39 +305,14 @@ class cd_nagios::server::files (
content =&gt; template($ng_ssl_vhost_erb),
notify =&gt; Service[$ae_service],
}
if $ng_http_https_fw == true {
file { $ng_forward_conf:
ensure =&gt; file,
path =&gt; $ng_forward_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_forward_conf_erb),
notify =&gt; Service[$ae_service],
}
}
}
if $ng_enable_index == true {
if $ng_use_https != true {
file { $ng_index_html_file:
ensure =&gt; file,
path =&gt; $ng_index_html_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_sys_content_t,
seluser =&gt; system_u,
content =&gt; template($ng_index_html_erb),
notify =&gt; Service[$ae_service],
# remove ssl_vhost
file { $ng_ssl_vhost_file:
ensure =&gt; absent,
}
}
}
@@ -374,7 +324,7 @@ class cd_nagios::server::files (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -174,7 +174,7 @@ class cd_nagios::server::service (
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -220,7 +220,7 @@ $ng_service = $::cd_nagios::params::ng_service
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -90,7 +90,7 @@
</div>
<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>
0.9.9 (ruby-2.0.0).
</div>

View File

@@ -53,11 +53,25 @@ class cd_nagios::server::files (
notify => Service[$ng_service],
}
# manage nagios.conf for httpd
# # manage nagios.conf for httpd
file { $ng_nagios_conf:
# file { $ng_nagios_conf:
# ensure => file,
# path => $ng_nagios_conf,
# owner => 'root',
# group => 'root',
# mode => '0644',
# selrange => s0,
# selrole => object_r,
# seltype => httpd_config_t,
# seluser => system_u,
# content => template($ng_nagios_conf_erb),
# notify => Service[$ae_service],
# }
file { $ng_forward_conf:
ensure => file,
path => $ng_nagios_conf,
path => $ng_forward_conf,
owner => 'root',
group => 'root',
mode => '0644',
@@ -65,28 +79,14 @@ class cd_nagios::server::files (
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_nagios_conf_erb),
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),
content => template($ng_forward_conf_erb),
notify => Service[$ae_service],
}
if $ng_use_https == true {
# create ssl vhost
file { $ng_ssl_vhost_file:
ensure => file,
path => $ng_ssl_vhost_file,
@@ -100,39 +100,14 @@ class cd_nagios::server::files (
content => template($ng_ssl_vhost_erb),
notify => Service[$ae_service],
}
if $ng_http_https_fw == true {
file { $ng_forward_conf:
ensure => file,
path => $ng_forward_conf,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_forward_conf_erb),
notify => Service[$ae_service],
}
}
}
if $ng_enable_index == true {
if $ng_use_https != true {
file { $ng_index_html_file:
ensure => file,
path => $ng_index_html_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_sys_content_t,
seluser => system_u,
content => template($ng_index_html_erb),
notify => Service[$ae_service],
# remove ssl_vhost
file { $ng_ssl_vhost_file:
ensure => absent,
}
}
}

View File

@@ -7,7 +7,85 @@
Redirect permanent / https://<%= @ng_webserver_name %>/nagios
<% end -%>
<% 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 -%>
<Directory />
AllowOverride All

View File

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