Merge branch 'jenkins' into 'master'

Jenkins

See merge request !20
This commit is contained in:
12ww1160
2017-07-21 17:38:49 +02:00
21 changed files with 167 additions and 130 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/919531809c41d5a">919531809c41d5a</a> Jenkins Server <i>2017-07-21 15:24:59</i>
<p>
<h3>recommit for updates in build 37</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/8db53dcf334af1b">8db53dcf334af1b</a> Arne Teuke <i>2017-07-21 15:24:35</i>
<p>
<h3>re-ordering</h3>
</p>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/abeba0589d446de">abeba0589d446de</a> Jenkins Server <i>2017-07-21 15:18:35</i>
<p>
<h3>recommit for updates in build 36</h3>

View File

@@ -186,7 +186,7 @@
</div>
<div id="footer">
Generated on Fri Jul 21 17:24:53 2017 by
Generated on Fri Jul 21 17:46:52 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

@@ -304,7 +304,7 @@ environments.</p>
</div></div>
<div id="footer">
Generated on Fri Jul 21 17:24:54 2017 by
Generated on Fri Jul 21 17:46:53 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

@@ -304,7 +304,7 @@ environments.</p>
</div></div>
<div id="footer">
Generated on Fri Jul 21 17:24:54 2017 by
Generated on Fri Jul 21 17:46:52 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 Fri Jul 21 17:24:55 2017 by
Generated on Fri Jul 21 17:46:53 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,13 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
91
92
93
94</pre>
94
95
96
97
98
99
100</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/certbot/config.pp', line 23</span>
@@ -222,6 +228,12 @@ class cd_nagios::certbot::config (
creates =&gt; &#39;/etc/httpd/conf.d/.cert_created&#39;,
}
exec { &#39;remove_nagios_conf&#39;:
command =&gt; &quot;rm -Rf ${ng_nagios_conf}&quot;,
creates =&gt; &#39;/etc/httpd/conf.d/.cert_created&#39;,
require =&gt; Exec[&#39;remove_forward_vhost&#39;],
}
# create temp vhost file
exec { &#39;create_temp_vhost&#39;:
@@ -231,7 +243,7 @@ class cd_nagios::certbot::config (
provider =&gt; &#39;shell&#39;,
creates =&gt; &#39;/etc/httpd/conf.d/.created&#39;,
notify =&gt; Service[&#39;httpd&#39;],
require =&gt; Exec[&#39;remove_forward_vhost&#39;],
require =&gt; Exec[&#39;remove_nagios_conf&#39;],
}
# create cert
@@ -284,7 +296,7 @@ class cd_nagios::certbot::config (
</div>
<div id="footer">
Generated on Fri Jul 21 17:24:57 2017 by
Generated on Fri Jul 21 17:46:55 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 Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:55 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 Fri Jul 21 17:24:57 2017 by
Generated on Fri Jul 21 17:46:55 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

@@ -187,7 +187,7 @@ class cd_nagios::main::config (
</div>
<div id="footer">
Generated on Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:54 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 Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:54 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 Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:54 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 Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:54 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

@@ -2313,7 +2313,7 @@ $ng_certbot_temp_file = &#39;/etc/httpd/conf.d/certbot_temp.conf&#39;
</div>
<div id="footer">
Generated on Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:54 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 Fri Jul 21 17:24:57 2017 by
Generated on Fri Jul 21 17:46:55 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 Fri Jul 21 17:24:57 2017 by
Generated on Fri Jul 21 17:46:55 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

@@ -284,7 +284,10 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
175
176
177
178</pre>
178
179
180
181</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span>
@@ -294,49 +297,36 @@ class cd_nagios::server::files (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_enable_certbot == true {
require cd_nagios::certbot::config
require cd_nagios::main::dirs
if $ng_use_https == true {
if $ng_enable_certbot == true {
# manage nagios.cfg
require cd_nagios::certbot::config
require cd_nagios::main::dirs
# manage nagios.cfg
# manage cgi.cfg
# manage cgi.cfg
file { $ng_cgi_cfg_file:
ensure =&gt; file,
path =&gt; $ng_cgi_cfg_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; nagios_etc_t,
seluser =&gt; system_u,
content =&gt; template($ng_cgi_cfg_erb),
notify =&gt; Service[$ng_service],
}
# manage nagios.conf for httpd
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],
}
if $ng_http_https_fw == true {
file { $ng_forward_conf:
file { $ng_cgi_cfg_file:
ensure =&gt; file,
path =&gt; $ng_forward_conf,
path =&gt; $ng_cgi_cfg_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; nagios_etc_t,
seluser =&gt; system_u,
content =&gt; template($ng_cgi_cfg_erb),
notify =&gt; Service[$ng_service],
}
# manage nagios.conf for httpd
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;,
@@ -344,26 +334,42 @@ class cd_nagios::server::files (
selrole =&gt; object_r,
seltype =&gt; httpd_config_t,
seluser =&gt; system_u,
content =&gt; template($ng_forward_conf_erb),
content =&gt; template($ng_nagios_conf_erb),
notify =&gt; Service[$ae_service],
}
}
# manage welcome.conf for nagios web server
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_disable_welcome == true {
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],
# manage welcome.conf for nagios web server
if $ng_disable_welcome == true {
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],
}
}
}
}
@@ -452,7 +458,7 @@ class cd_nagios::server::files (
</div>
<div id="footer">
Generated on Fri Jul 21 17:24:56 2017 by
Generated on Fri Jul 21 17:46:55 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 Fri Jul 21 17:24:57 2017 by
Generated on Fri Jul 21 17:46:55 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 Fri Jul 21 17:24:57 2017 by
Generated on Fri Jul 21 17:46:55 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 Fri Jul 21 17:24:55 2017 by
Generated on Fri Jul 21 17:46:53 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

@@ -37,6 +37,12 @@ class cd_nagios::certbot::config (
creates => '/etc/httpd/conf.d/.cert_created',
}
exec { 'remove_nagios_conf':
command => "rm -Rf ${ng_nagios_conf}",
creates => '/etc/httpd/conf.d/.cert_created',
require => Exec['remove_forward_vhost'],
}
# create temp vhost file
exec { 'create_temp_vhost':
@@ -46,7 +52,7 @@ class cd_nagios::certbot::config (
provider => 'shell',
creates => '/etc/httpd/conf.d/.created',
notify => Service['httpd'],
require => Exec['remove_forward_vhost'],
require => Exec['remove_nagios_conf'],
}
# create cert

View File

@@ -25,49 +25,36 @@ class cd_nagios::server::files (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_enable_certbot == true {
require cd_nagios::certbot::config
require cd_nagios::main::dirs
if $ng_use_https == true {
if $ng_enable_certbot == true {
# manage nagios.cfg
require cd_nagios::certbot::config
require cd_nagios::main::dirs
# manage nagios.cfg
# manage cgi.cfg
# manage cgi.cfg
file { $ng_cgi_cfg_file:
ensure => file,
path => $ng_cgi_cfg_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
content => template($ng_cgi_cfg_erb),
notify => Service[$ng_service],
}
# manage nagios.conf for httpd
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],
}
if $ng_http_https_fw == true {
file { $ng_forward_conf:
file { $ng_cgi_cfg_file:
ensure => file,
path => $ng_forward_conf,
path => $ng_cgi_cfg_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
content => template($ng_cgi_cfg_erb),
notify => Service[$ng_service],
}
# manage nagios.conf for httpd
file { $ng_nagios_conf:
ensure => file,
path => $ng_nagios_conf,
owner => 'root',
group => 'root',
mode => '0644',
@@ -75,26 +62,42 @@ class cd_nagios::server::files (
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_forward_conf_erb),
content => template($ng_nagios_conf_erb),
notify => Service[$ae_service],
}
}
# manage welcome.conf for nagios web server
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_disable_welcome == true {
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],
# manage welcome.conf for nagios web server
if $ng_disable_welcome == true {
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],
}
}
}
}