10
CHANGELOG.md
10
CHANGELOG.md
@@ -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/2c6b5f8656e9fef">2c6b5f8656e9fef</a> Jenkins Server <i>2017-07-21 14:51:54</i>
|
||||||
|
<p>
|
||||||
|
<h3>recommit for updates in build 34</h3>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/3923a4adc5e4443">3923a4adc5e4443</a> Arne Teuke <i>2017-07-21 14:51:28</i>
|
||||||
|
<p>
|
||||||
|
<h3>changed config to use variables, added parameters</h3>
|
||||||
|
|
||||||
|
</p>
|
||||||
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/353e7e99cf92594">353e7e99cf92594</a> Jenkins Server <i>2017-07-21 14:42:28</i>
|
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/353e7e99cf92594">353e7e99cf92594</a> Jenkins Server <i>2017-07-21 14:42:28</i>
|
||||||
<p>
|
<p>
|
||||||
<h3>recommit for updates in build 33</h3>
|
<h3>recommit for updates in build 33</h3>
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
| `-- params.pp
|
| `-- params.pp
|
||||||
|-- templates
|
|-- templates
|
||||||
| |-- certbot
|
| |-- certbot
|
||||||
|
| | |-- create_tempfile.erb
|
||||||
| | |-- get_cert.erb
|
| | |-- get_cert.erb
|
||||||
| | |-- unless_get_cert.erb
|
| | |-- unless_get_cert.erb
|
||||||
| | `-- unless_renew_cert.erb
|
| | `-- unless_renew_cert.erb
|
||||||
@@ -77,4 +78,4 @@
|
|||||||
|-- README.md
|
|-- README.md
|
||||||
`-- REPOSTRUCTURE.md
|
`-- REPOSTRUCTURE.md
|
||||||
|
|
||||||
18 directories, 59 files
|
18 directories, 60 files
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:46 2017 by
|
Generated on Fri Jul 21 17:16:21 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>
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ environments.</p>
|
|||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:47 2017 by
|
Generated on Fri Jul 21 17:16:23 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>
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ environments.</p>
|
|||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:47 2017 by
|
Generated on Fri Jul 21 17:16:22 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>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class cd_nagios {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:47 2017 by
|
Generated on Fri Jul 21 17:16:23 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>
|
||||||
|
|||||||
@@ -162,7 +162,37 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
|||||||
53
|
53
|
||||||
54
|
54
|
||||||
55
|
55
|
||||||
56</pre>
|
56
|
||||||
|
57
|
||||||
|
58
|
||||||
|
59
|
||||||
|
60
|
||||||
|
61
|
||||||
|
62
|
||||||
|
63
|
||||||
|
64
|
||||||
|
65
|
||||||
|
66
|
||||||
|
67
|
||||||
|
68
|
||||||
|
69
|
||||||
|
70
|
||||||
|
71
|
||||||
|
72
|
||||||
|
73
|
||||||
|
74
|
||||||
|
75
|
||||||
|
76
|
||||||
|
77
|
||||||
|
78
|
||||||
|
79
|
||||||
|
80
|
||||||
|
81
|
||||||
|
82
|
||||||
|
83
|
||||||
|
84
|
||||||
|
85
|
||||||
|
86</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/certbot/config.pp', line 23</span>
|
<pre class="code"><span class="info file"># File 'manifests/certbot/config.pp', line 23</span>
|
||||||
@@ -176,6 +206,24 @@ class cd_nagios::certbot::config (
|
|||||||
|
|
||||||
require cd_certbot
|
require cd_certbot
|
||||||
|
|
||||||
|
# ensure there is no forward vhost file
|
||||||
|
|
||||||
|
exec { 'remove forward vhost':
|
||||||
|
command => "rm -Rf $ng_forward_conf",
|
||||||
|
creates => '/etc/httpd/conf.d/.cert_created',
|
||||||
|
}
|
||||||
|
|
||||||
|
# create temp vhost file
|
||||||
|
|
||||||
|
exec { 'create_temp_vhost':
|
||||||
|
command => template('cd_nagios/certbot/create_tempfile.erb'),
|
||||||
|
cwd => '/tmp',
|
||||||
|
path => ['/bin','/usr/bin'],
|
||||||
|
provider => 'shell',
|
||||||
|
creates => '/etc/httpd/conf.d/.created',
|
||||||
|
notify => Service['httpd'],
|
||||||
|
}
|
||||||
|
|
||||||
# create cert
|
# create cert
|
||||||
|
|
||||||
exec { 'create_cert':
|
exec { 'create_cert':
|
||||||
@@ -188,6 +236,18 @@ class cd_nagios::certbot::config (
|
|||||||
creates => '/etc/httpd/conf.d/.cert_created',
|
creates => '/etc/httpd/conf.d/.cert_created',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# remove temp_vhost
|
||||||
|
|
||||||
|
exec { 'remove_temp_vhost':
|
||||||
|
command => "rm -Rf ${ng_certbot_temp_file}",
|
||||||
|
cwd => '/tmp',
|
||||||
|
path => ['/bin','/usr/bin'],
|
||||||
|
provider => 'shell',
|
||||||
|
notify => Service['httpd'],
|
||||||
|
require => Exec['create_cert'],
|
||||||
|
creates => "/etc/letsencrypt/live/${ng_nagios_server}/cert.pem",
|
||||||
|
}
|
||||||
|
|
||||||
# renew certs
|
# renew certs
|
||||||
|
|
||||||
exec { 'renew_cert':
|
exec { 'renew_cert':
|
||||||
@@ -208,7 +268,7 @@ class cd_nagios::certbot::config (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ class cd_nagios::client::target (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:51 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -152,12 +152,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
|||||||
43
|
43
|
||||||
44
|
44
|
||||||
45
|
45
|
||||||
46
|
46</pre>
|
||||||
47
|
|
||||||
48
|
|
||||||
49
|
|
||||||
50
|
|
||||||
51</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 24</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 24</span>
|
||||||
@@ -178,11 +173,6 @@ class cd_nagios::main::config (
|
|||||||
if $ng_use_selinux_tools == true {
|
if $ng_use_selinux_tools == true {
|
||||||
include cd_nagios::selinux::config
|
include cd_nagios::selinux::config
|
||||||
}
|
}
|
||||||
|
|
||||||
if $ng_enable_certbot == true {
|
|
||||||
include cd_nagios::certbot::config
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::fqdn != $ng_nagios_server {
|
if $::fqdn != $ng_nagios_server {
|
||||||
@@ -197,7 +187,7 @@ class cd_nagios::main::config (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ class cd_nagios::main::dirs (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:49 2017 by
|
Generated on Fri Jul 21 17:16:24 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>
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ class cd_nagios::main::install (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ class cd_nagios::main::user (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:49 2017 by
|
Generated on Fri Jul 21 17:16:24 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>
|
||||||
|
|||||||
@@ -2126,7 +2126,9 @@ well as for certbot.</p>
|
|||||||
380
|
380
|
||||||
381
|
381
|
||||||
382
|
382
|
||||||
383</pre>
|
383
|
||||||
|
384
|
||||||
|
385</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 213</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 213</span>
|
||||||
@@ -2295,7 +2297,9 @@ $ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
|
|||||||
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
|
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
|
||||||
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
|
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
|
||||||
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
|
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
|
||||||
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
|
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
|
||||||
|
$ng_create_tempvhost = 'cd_nagios/certbot/create_tempfile.erb'
|
||||||
|
$ng_certbot_temp_file = '/etc/httpd/conf.d/certbot_temp.conf'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
|
|
||||||
@@ -2309,7 +2313,7 @@ $ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:49 2017 by
|
Generated on Fri Jul 21 17:16:24 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>
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ class cd_nagios::selinux::config (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:51 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -208,7 +208,83 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
|||||||
99
|
99
|
||||||
100
|
100
|
||||||
101
|
101
|
||||||
102</pre>
|
102
|
||||||
|
103
|
||||||
|
104
|
||||||
|
105
|
||||||
|
106
|
||||||
|
107
|
||||||
|
108
|
||||||
|
109
|
||||||
|
110
|
||||||
|
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
|
||||||
|
140
|
||||||
|
141
|
||||||
|
142
|
||||||
|
143
|
||||||
|
144
|
||||||
|
145
|
||||||
|
146
|
||||||
|
147
|
||||||
|
148
|
||||||
|
149
|
||||||
|
150
|
||||||
|
151
|
||||||
|
152
|
||||||
|
153
|
||||||
|
154
|
||||||
|
155
|
||||||
|
156
|
||||||
|
157
|
||||||
|
158
|
||||||
|
159
|
||||||
|
160
|
||||||
|
161
|
||||||
|
162
|
||||||
|
163
|
||||||
|
164
|
||||||
|
165
|
||||||
|
166
|
||||||
|
167
|
||||||
|
168
|
||||||
|
169
|
||||||
|
170
|
||||||
|
171
|
||||||
|
172
|
||||||
|
173
|
||||||
|
174
|
||||||
|
175
|
||||||
|
176
|
||||||
|
177
|
||||||
|
178</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>
|
||||||
@@ -218,49 +294,34 @@ class cd_nagios::server::files (
|
|||||||
) inherits cd_nagios::params {
|
) inherits cd_nagios::params {
|
||||||
|
|
||||||
if $::fqdn == $ng_nagios_server {
|
if $::fqdn == $ng_nagios_server {
|
||||||
|
if $ng_enable_certbot == true {
|
||||||
|
require cd_nagios::certbot::config
|
||||||
|
require cd_nagios::main::dirs
|
||||||
|
|
||||||
require cd_nagios::main::dirs
|
# manage nagios.cfg
|
||||||
|
|
||||||
# manage nagios.cfg
|
|
||||||
|
|
||||||
|
|
||||||
# manage cgi.cfg
|
# manage cgi.cfg
|
||||||
|
|
||||||
file { $ng_cgi_cfg_file:
|
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:
|
|
||||||
ensure => 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',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
@@ -268,18 +329,73 @@ class cd_nagios::server::files (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => httpd_config_t,
|
seltype => httpd_config_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template($ng_forward_conf_erb),
|
content => template($ng_nagios_conf_erb),
|
||||||
notify => Service[$ae_service],
|
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],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage welcome.conf for nagios web server
|
else {
|
||||||
|
|
||||||
if $ng_disable_welcome == true {
|
require cd_nagios::main::dirs
|
||||||
|
|
||||||
file { $ng_welcome_conf:
|
# manage nagios.cfg
|
||||||
|
|
||||||
|
|
||||||
|
# manage cgi.cfg
|
||||||
|
|
||||||
|
file { $ng_cgi_cfg_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
path => $ng_welcome_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',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
@@ -287,9 +403,45 @@ class cd_nagios::server::files (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => httpd_config_t,
|
seltype => httpd_config_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template($ng_welcome_conf_erb),
|
content => template($ng_nagios_conf_erb),
|
||||||
notify => Service[$ae_service],
|
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],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
@@ -300,7 +452,7 @@ class cd_nagios::server::files (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class cd_nagios::server::service (
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:50 2017 by
|
Generated on Fri Jul 21 17:16:25 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>
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ $ng_service = $::cd_nagios::params::ng_service
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:51 2017 by
|
Generated on Fri Jul 21 17:16:26 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>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
Generated on Fri Jul 21 16:51:47 2017 by
|
Generated on Fri Jul 21 17:16:23 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>
|
||||||
|
|||||||
@@ -29,6 +29,24 @@ class cd_nagios::certbot::config (
|
|||||||
|
|
||||||
require cd_certbot
|
require cd_certbot
|
||||||
|
|
||||||
|
# ensure there is no forward vhost file
|
||||||
|
|
||||||
|
exec { 'remove forward vhost':
|
||||||
|
command => "rm -Rf $ng_forward_conf",
|
||||||
|
creates => '/etc/httpd/conf.d/.cert_created',
|
||||||
|
}
|
||||||
|
|
||||||
|
# create temp vhost file
|
||||||
|
|
||||||
|
exec { 'create_temp_vhost':
|
||||||
|
command => template('cd_nagios/certbot/create_tempfile.erb'),
|
||||||
|
cwd => '/tmp',
|
||||||
|
path => ['/bin','/usr/bin'],
|
||||||
|
provider => 'shell',
|
||||||
|
creates => '/etc/httpd/conf.d/.created',
|
||||||
|
notify => Service['httpd'],
|
||||||
|
}
|
||||||
|
|
||||||
# create cert
|
# create cert
|
||||||
|
|
||||||
exec { 'create_cert':
|
exec { 'create_cert':
|
||||||
@@ -41,6 +59,18 @@ class cd_nagios::certbot::config (
|
|||||||
creates => '/etc/httpd/conf.d/.cert_created',
|
creates => '/etc/httpd/conf.d/.cert_created',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# remove temp_vhost
|
||||||
|
|
||||||
|
exec { 'remove_temp_vhost':
|
||||||
|
command => "rm -Rf ${ng_certbot_temp_file}",
|
||||||
|
cwd => '/tmp',
|
||||||
|
path => ['/bin','/usr/bin'],
|
||||||
|
provider => 'shell',
|
||||||
|
notify => Service['httpd'],
|
||||||
|
require => Exec['create_cert'],
|
||||||
|
creates => "/etc/letsencrypt/live/${ng_nagios_server}/cert.pem",
|
||||||
|
}
|
||||||
|
|
||||||
# renew certs
|
# renew certs
|
||||||
|
|
||||||
exec { 'renew_cert':
|
exec { 'renew_cert':
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ class cd_nagios::main::config (
|
|||||||
if $ng_use_selinux_tools == true {
|
if $ng_use_selinux_tools == true {
|
||||||
include cd_nagios::selinux::config
|
include cd_nagios::selinux::config
|
||||||
}
|
}
|
||||||
|
|
||||||
if $ng_enable_certbot == true {
|
|
||||||
include cd_nagios::certbot::config
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::fqdn != $ng_nagios_server {
|
if $::fqdn != $ng_nagios_server {
|
||||||
|
|||||||
@@ -374,7 +374,9 @@ $ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
|
|||||||
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
|
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
|
||||||
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
|
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
|
||||||
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
|
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
|
||||||
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
|
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
|
||||||
|
$ng_create_tempvhost = 'cd_nagios/certbot/create_tempfile.erb'
|
||||||
|
$ng_certbot_temp_file = '/etc/httpd/conf.d/certbot_temp.conf'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
|
|
||||||
|
|||||||
@@ -25,49 +25,34 @@ class cd_nagios::server::files (
|
|||||||
) inherits cd_nagios::params {
|
) inherits cd_nagios::params {
|
||||||
|
|
||||||
if $::fqdn == $ng_nagios_server {
|
if $::fqdn == $ng_nagios_server {
|
||||||
|
if $ng_enable_certbot == true {
|
||||||
|
require cd_nagios::certbot::config
|
||||||
|
require cd_nagios::main::dirs
|
||||||
|
|
||||||
require cd_nagios::main::dirs
|
# manage nagios.cfg
|
||||||
|
|
||||||
# manage nagios.cfg
|
|
||||||
|
|
||||||
|
|
||||||
# manage cgi.cfg
|
# manage cgi.cfg
|
||||||
|
|
||||||
file { $ng_cgi_cfg_file:
|
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:
|
|
||||||
ensure => 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',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
@@ -75,18 +60,73 @@ class cd_nagios::server::files (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => httpd_config_t,
|
seltype => httpd_config_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template($ng_forward_conf_erb),
|
content => template($ng_nagios_conf_erb),
|
||||||
notify => Service[$ae_service],
|
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],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage welcome.conf for nagios web server
|
else {
|
||||||
|
|
||||||
if $ng_disable_welcome == true {
|
require cd_nagios::main::dirs
|
||||||
|
|
||||||
file { $ng_welcome_conf:
|
# manage nagios.cfg
|
||||||
|
|
||||||
|
|
||||||
|
# manage cgi.cfg
|
||||||
|
|
||||||
|
file { $ng_cgi_cfg_file:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
path => $ng_welcome_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',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
@@ -94,9 +134,45 @@ class cd_nagios::server::files (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => httpd_config_t,
|
seltype => httpd_config_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template($ng_welcome_conf_erb),
|
content => template($ng_nagios_conf_erb),
|
||||||
notify => Service[$ae_service],
|
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],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
templates/certbot/create_tempfile.erb
Normal file
11
templates/certbot/create_tempfile.erb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
echo "# temporary vhost file
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin root@localhost
|
||||||
|
DocumentRoot /var/www/html
|
||||||
|
ServerName <%= @ng_nagios_server %>
|
||||||
|
<Directory />
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
" > <%= @ng_certbot_temp_file %>
|
||||||
|
touch /etc/httpd/conf.d/.created
|
||||||
Reference in New Issue
Block a user