From b37864c7a366affc4a2214d712161e2eb136b5f6 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 21 Jul 2017 13:15:47 +0100 Subject: [PATCH 1/7] testing options both for hosts and ips --- Jenkinsfile | 2 ++ templates/httpd/nagios_conf.erb | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e88dff1..0973ded 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -202,6 +202,8 @@ Changelog of Git Changelog. } } + + stage('recommit changes to repo') { steps { sshagent(['0c22dc63-2ae0-4ad5-98e0-65aa0f0f411g']) { diff --git a/templates/httpd/nagios_conf.erb b/templates/httpd/nagios_conf.erb index 8337061..7ca0f6c 100644 --- a/templates/httpd/nagios_conf.erb +++ b/templates/httpd/nagios_conf.erb @@ -19,11 +19,11 @@ ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/" = 2.3> Require all granted -<% if @ng_required_hosts != '' -%> +<% if @ng_required_hosts != [] -%> <% @ng_required_hosts.each do |required_host| -%> Require host <%= required_host %> <% end end -%> -<% if @ng_required_ips != '' -%> +<% if @ng_required_ips != [] -%> <% @ng_required_ips.each do |required_ips| -%> Require ip <%= required_ips %> <% end end -%> @@ -56,11 +56,11 @@ Alias /nagios "/usr/share/nagios/html" = 2.3> Require all granted -<% if @ng_required_hosts != '' -%> +<% if @ng_required_hosts != [] -%> <% @ng_required_hosts.each do |required_host| -%> Require host <%= required_host %> <% end end -%> -<% if @ng_required_ips != '' %> +<% if @ng_required_ips [] -%> <% @ng_required_ips.each do |required_ips| -%> Require ip <%= required_ips %> <% end end -%> From de3a7fd4fa0141549e50819b3381eae8941c3088 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 21 Jul 2017 13:20:44 +0100 Subject: [PATCH 2/7] testing options both for hosts and ips --- templates/httpd/nagios_conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/httpd/nagios_conf.erb b/templates/httpd/nagios_conf.erb index 7ca0f6c..46561ce 100644 --- a/templates/httpd/nagios_conf.erb +++ b/templates/httpd/nagios_conf.erb @@ -60,7 +60,7 @@ Alias /nagios "/usr/share/nagios/html" <% @ng_required_hosts.each do |required_host| -%> Require host <%= required_host %> <% end end -%> -<% if @ng_required_ips [] -%> +<% if @ng_required_ips != [] -%> <% @ng_required_ips.each do |required_ips| -%> Require ip <%= required_ips %> <% end end -%> From a28f890bdde57e2c6c99d8ef57b5aefef9ae95f8 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 21 Jul 2017 13:30:09 +0100 Subject: [PATCH 3/7] testing options both for hosts and ips --- templates/httpd/nagios_conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/httpd/nagios_conf.erb b/templates/httpd/nagios_conf.erb index 46561ce..41e9bff 100644 --- a/templates/httpd/nagios_conf.erb +++ b/templates/httpd/nagios_conf.erb @@ -19,7 +19,7 @@ ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/" = 2.3> Require all granted -<% if @ng_required_hosts != [] -%> +<% unless @ng_required_hosts.empty? -%> <% @ng_required_hosts.each do |required_host| -%> Require host <%= required_host %> <% end end -%> From b95350b8d8e58b4ff26ceccb5f2c35019a958781 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 21 Jul 2017 13:41:33 +0100 Subject: [PATCH 4/7] testing options both for hosts and ips --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 7a0e6ea..cc047d6 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -308,7 +308,7 @@ $ng_ack_no_send = '0', $ng_use_selinux_tools = true, # httpd -$ng_required_hosts = [''], +$ng_required_hosts = '', $ng_required_ips = ['127.0.0.0/8'], ) { From 442fd08f623728f1a9714a9aa78ed482925882f5 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 21 Jul 2017 13:44:03 +0100 Subject: [PATCH 5/7] testing options both for hosts and ips --- templates/httpd/nagios_conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/httpd/nagios_conf.erb b/templates/httpd/nagios_conf.erb index 41e9bff..6d5f0e8 100644 --- a/templates/httpd/nagios_conf.erb +++ b/templates/httpd/nagios_conf.erb @@ -56,7 +56,7 @@ Alias /nagios "/usr/share/nagios/html" = 2.3> Require all granted -<% if @ng_required_hosts != [] -%> +<% unless @ng_required_hosts.empty? -%> <% @ng_required_hosts.each do |required_host| -%> Require host <%= required_host %> <% end end -%> From 5d12bf44374b9349ee39a4c7cafffca17f286b1f Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Fri, 21 Jul 2017 13:51:07 +0100 Subject: [PATCH 6/7] found format options both for hosts and ips --- manifests/params.pp | 13 ++++++------- templates/httpd/nagios_conf.erb | 20 ++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index cc047d6..2a1adee 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -194,12 +194,11 @@ # "Send Notification" to be unchecked. # @param [boolean] ng_use_selinux_tools Whether to enable selinux tools and # policies. only effective if selinux is enabled. -# @param [array] ng_required_hosts Array of **__FQDNs__** for hosts which -# should be allowed/required. every entry in the array creates a new line in -# the configuration file. -# @param [array] ng_required_ips Array of **__Ip addresses __** for hosts which -# should be allowed/reqired. every entry in the array creates a new line in -# the configuration file +# @param [string] ng_required_hosts String of **__FQDNs__** for hosts which +# should be allowed/required. Requires format +# 'host1.example.com host2.example.com' +# @param [string] ng_required_ips string of **__Ip addresses __** for hosts which +# should be allowed/reqired. Requires format 'ipaddress ip address range' ############################################################################### class cd_nagios::params ( @@ -309,7 +308,7 @@ $ng_use_selinux_tools = true, # httpd $ng_required_hosts = '', -$ng_required_ips = ['127.0.0.0/8'], +$ng_required_ips = '127.0.0.0/8', ) { diff --git a/templates/httpd/nagios_conf.erb b/templates/httpd/nagios_conf.erb index 6d5f0e8..2e84105 100644 --- a/templates/httpd/nagios_conf.erb +++ b/templates/httpd/nagios_conf.erb @@ -20,13 +20,11 @@ ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/" Require all granted <% unless @ng_required_hosts.empty? -%> -<% @ng_required_hosts.each do |required_host| -%> - Require host <%= required_host %> -<% end end -%> -<% if @ng_required_ips != [] -%> -<% @ng_required_ips.each do |required_ips| -%> + Require host <%= @ng_required_hosts %> +<% end -%> +<% unless @ng_required_ips.empty? -%> Require ip <%= required_ips %> -<% end end -%> +<% end -%> AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios/passwd @@ -57,13 +55,11 @@ Alias /nagios "/usr/share/nagios/html" Require all granted <% unless @ng_required_hosts.empty? -%> -<% @ng_required_hosts.each do |required_host| -%> - Require host <%= required_host %> -<% end end -%> -<% if @ng_required_ips != [] -%> -<% @ng_required_ips.each do |required_ips| -%> + Require host <%= @ng_required_hosts %> +<% end -%> +<% unless @ng_required_ips.empty? -%> Require ip <%= required_ips %> -<% end end -%> +<% end -%> AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios/passwd From 4ec7633f976a2250108cb8eb81771d3f46b372e5 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Fri, 21 Jul 2017 14:51:33 +0200 Subject: [PATCH 7/7] recommit for updates in build 24 --- CHANGELOG.md | 20 +++++++++ REPOSTRUCTURE.md | 3 +- doc/_index.html | 2 +- doc/file.README.html | 2 +- doc/index.html | 2 +- doc/puppet_classes/cd_nagios.html | 2 +- .../cd_nagios_3A_3Aclient_3A_3Atarget.html | 2 +- ...cd_nagios_3A_3Afirewall_3A_3Aiptables.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Adirs.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Auser.html | 2 +- doc/puppet_classes/cd_nagios_3A_3Aparams.html | 42 +++++++++---------- .../cd_nagios_3A_3Aselinux_3A_3Aconfig.html | 2 +- ..._nagios_3A_3Aserver_3A_3Aaccess_rules.html | 2 +- .../cd_nagios_3A_3Aserver_3A_3Afiles.html | 2 +- .../cd_nagios_3A_3Aserver_3A_3Aservice.html | 2 +- .../cd_nagios_3A_3Aserver_3A_3Aaccess.html | 2 +- doc/top-level-namespace.html | 2 +- 19 files changed, 58 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c376dc..d5eb6b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,26 @@ Changelog of Git Changelog.

No issue

+109eea2716be3ae Jenkins Server 2017-07-21 11:35:04 +

+

recommit for updates in build 18

+ +

+5de81e818498830 Arne Teuke 2017-07-21 11:34:48 +

+

testing options both for hosts and ips

+ +

+41434c9607ab037 Arne Teuke 2017-07-21 11:28:50 +

+

adding options both for hosts and ips

+ +

+544f48d800ad39a Arne Teuke 2017-07-21 11:21:12 +

+

adding options both for hosts and ips

+ +

969e377d5db6423 Jenkins Server 2017-07-21 11:06:59

recommit for updates in build 15

diff --git a/REPOSTRUCTURE.md b/REPOSTRUCTURE.md index 1beb036..2b150b5 100644 --- a/REPOSTRUCTURE.md +++ b/REPOSTRUCTURE.md @@ -9,6 +9,7 @@ | | |-- full_list.js | | `-- jquery.js | |-- puppet_classes +| | |-- cd_nagios_3A_3Aclient_3A_3Atarget.html | | |-- cd_nagios_3A_3Afirewall_3A_3Aiptables.html | | |-- cd_nagios_3A_3Amain_3A_3Aconfig.html | | |-- cd_nagios_3A_3Amain_3A_3Adirs.html @@ -67,4 +68,4 @@ |-- README.md `-- REPOSTRUCTURE.md -16 directories, 51 files +16 directories, 52 files diff --git a/doc/_index.html b/doc/_index.html index 4660179..e6c2f23 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -181,7 +181,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index 9ac4d07..d74e1e3 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -297,7 +297,7 @@ environments.

diff --git a/doc/index.html b/doc/index.html index 84f0416..3b27837 100644 --- a/doc/index.html +++ b/doc/index.html @@ -297,7 +297,7 @@ environments.

diff --git a/doc/puppet_classes/cd_nagios.html b/doc/puppet_classes/cd_nagios.html index 75bbcf5..bfcbea5 100644 --- a/doc/puppet_classes/cd_nagios.html +++ b/doc/puppet_classes/cd_nagios.html @@ -139,7 +139,7 @@ class cd_nagios { diff --git a/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html index c0a9e56..982637c 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html @@ -368,7 +368,7 @@ class cd_nagios::client::target ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html index 13a7273..cba9167 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html +++ b/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html @@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html index 1786747..be593a1 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html @@ -187,7 +187,7 @@ class cd_nagios::main::config ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html index ee4b5ef..97786f3 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html @@ -468,7 +468,7 @@ class cd_nagios::main::dirs ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html index 2fe8f67..1880f6f 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html @@ -235,7 +235,7 @@ class cd_nagios::main::install ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html index 81cca77..ef0b2b6 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html @@ -200,7 +200,7 @@ class cd_nagios::main::user ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aparams.html b/doc/puppet_classes/cd_nagios_3A_3Aparams.html index fe1ded2..df0dd9e 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aparams.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aparams.html @@ -1814,18 +1814,19 @@ enabled.

ng_required_hosts - (array) + (string) - (defaults to: ['']) + (defaults to: '')
-

Array of FQDNs for hosts which -should be allowed/required. -every entry in the array creates a new line in -the configuration file.

+

String of FQDNs for hosts which +should be +allowed/required. Requires format +'host1.example.com +host2.example.com'

@@ -1835,23 +1836,20 @@ the configuration file.

ng_required_ips - (array) + (string) - (defaults to: ['127.0.0.0/8']) + (defaults to: '127.0.0.0/8')
-

Array of <b>_<em>Ip addresses __** for hosts which +

string of <b>_<em>Ip addresses __** for hosts which should be -allowed/reqired. every entry in the array creates a new line in -the -configuration fileIp addresses _</em></b> for hosts -which -should be allowed/reqired. every entry in the array creates a new -line in -the configuration file

+allowed/reqired. Requires format 'ipaddress ip address range'Ip +addresses _</em></b> for hosts which +should be allowed/reqired. +Requires format 'ipaddress ip address range'

@@ -1873,6 +1871,7 @@ the configuration file

 
 
+203
 204
 205
 206
@@ -2029,11 +2028,10 @@ the configuration file

357 358 359 -360 -361
+360 -
# File 'manifests/params.pp', line 204
+        
# File 'manifests/params.pp', line 203
 
 class cd_nagios::params (
 
@@ -2142,8 +2140,8 @@ $ng_ack_no_send       = '0',
 $ng_use_selinux_tools = true,
 
 # httpd
-$ng_required_hosts    = [''],
-$ng_required_ips      = ['127.0.0.0/8'],
+$ng_required_hosts    = '',
+$ng_required_ips      = '127.0.0.0/8',
 
 ) {
 
@@ -2200,7 +2198,7 @@ $ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
 
 
       
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html
index fb9a47e..45c3e5b 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html
@@ -249,7 +249,7 @@ class cd_nagios::selinux::config (
 
 
       
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
index f41565e..a6e798e 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
 
 
       
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
index 1df61f4..7d514c3 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
@@ -228,7 +228,7 @@ class cd_nagios::server::files (
 
 
       
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html
index ada8a07..2781660 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html
@@ -174,7 +174,7 @@ class cd_nagios::server::service (
 
 
       
diff --git a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
index e3f13f8..8b98fda 100644
--- a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
+++ b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
@@ -220,7 +220,7 @@ $ng_service       = $::cd_nagios::params::ng_service
 
 
       
diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html
index b3b4867..b8dd2dc 100644
--- a/doc/top-level-namespace.html
+++ b/doc/top-level-namespace.html
@@ -90,7 +90,7 @@