diff --git a/CHANGELOG.md b/CHANGELOG.md index c56be5e..8c376dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,30 +8,75 @@ Changelog of Git Changelog.

No issue

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

+

recommit for updates in build 15

+ +

+e402224ff9bb367 Arne Teuke 2017-07-21 11:06:36 +

+

trying empty array

+ +

+49551a3d9af3460 Arne Teuke 2017-07-21 10:43:06 +

+

included control for nagios.conf

+ +

05036af24182601 Jenkins Server 2017-07-20 16:26:40

recommit for updates in build 12

-

-6e251a61a25bb1d Arne Teuke 2017-07-20 16:26:21 -

-

changed wrong refresh

-

2d7dc8a5c57ed98 Jenkins Server 2017-07-20 16:21:27

recommit for updates in build 11

-

-3252eaf33a90183 Arne Teuke 2017-07-20 16:21:09 -

-

trying to work my way again through selinux

-

33ed2fc013f9abd Jenkins Server 2017-07-20 16:15:02

recommit for updates in build 10

+

+016ec1e6dbe77ac Jenkins Server 2017-07-20 15:17:24 +

+

recommit for updates in build 8

+ +

+84a42a16a33cd80 Jenkins Server 2017-07-20 14:46:15 +

+

recommit for updates in build 4

+ +

+030e5f68f509f71 Jenkins Server 2017-07-20 14:11:13 +

+

recommit for updates in build 3

+ +

+3a3e3ceef9a4a2f Jenkins Server 2017-07-20 13:47:46 +

+

recommit for updates in build 2

+ +

+ +

v0.0.0.7

+

No issue

+ + +5fcf6031faa6aab Arne Teuke 2017-07-20 16:30:38 +

+

updated README

+ +

+6e251a61a25bb1d Arne Teuke 2017-07-20 16:26:21 +

+

changed wrong refresh

+ +

+3252eaf33a90183 Arne Teuke 2017-07-20 16:21:09 +

+

trying to work my way again through selinux

+

a33a855948f5050 Arne Teuke 2017-07-20 16:14:42

@@ -42,11 +87,6 @@ Changelog of Git Changelog.

trying to work my way again through selinux

-

-016ec1e6dbe77ac Jenkins Server 2017-07-20 15:17:24 -

-

recommit for updates in build 8

-

508e672c317a2b8 Arne Teuke 2017-07-20 15:16:51

@@ -67,21 +107,11 @@ Changelog of Git Changelog.

testing array

-

-84a42a16a33cd80 Jenkins Server 2017-07-20 14:46:15 -

-

recommit for updates in build 4

-

4c9cff0e73d216c Arne Teuke 2017-07-20 14:45:54

added check for nagios_server to access

-

-030e5f68f509f71 Jenkins Server 2017-07-20 14:11:13 -

-

recommit for updates in build 3

-

8a14684ca214be5 Arne Teuke 2017-07-20 14:10:54

@@ -92,11 +122,6 @@ Changelog of Git Changelog.

moved service dependency to access_rules

-

-3a3e3ceef9a4a2f Jenkins Server 2017-07-20 13:47:46 -

-

recommit for updates in build 2

-

febc8f1a348f2e7 Arne Teuke 2017-07-20 13:47:24

diff --git a/doc/_index.html b/doc/_index.html index d2e63bd..4660179 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -73,6 +73,11 @@ +

  • + cd_nagios::client::target + +
  • +
  • cd_nagios::firewall::iptables @@ -176,7 +181,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index 28d8d06..9ac4d07 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 4908ecc..84f0416 100644 --- a/doc/index.html +++ b/doc/index.html @@ -297,7 +297,7 @@ environments.

    diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html index ed0adf4..d7b54ba 100644 --- a/doc/puppet_class_list.html +++ b/doc/puppet_class_list.html @@ -47,70 +47,77 @@
  • -
  • +
  • +
    + cd_nagios::client::target +
    +
  • + + +
  • cd_nagios::firewall::iptables
  • -
  • +
  • cd_nagios::main::config
  • -
  • +
  • cd_nagios::main::dirs
  • -
  • +
  • cd_nagios::main::install
  • -
  • +
  • cd_nagios::main::user
  • -
  • +
  • cd_nagios::params
  • -
  • +
  • cd_nagios::selinux::config
  • -
  • +
  • cd_nagios::server::access_rules
  • -
  • +
  • cd_nagios::server::files
  • -
  • +
  • cd_nagios::server::service
    diff --git a/doc/puppet_classes/cd_nagios.html b/doc/puppet_classes/cd_nagios.html index f2de14a..75bbcf5 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 new file mode 100644 index 0000000..c0a9e56 --- /dev/null +++ b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html @@ -0,0 +1,378 @@ + + + + + + + Puppet Class: cd_nagios::client::target + + — Documentation by YARD 0.9.9 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: cd_nagios::client::target

    +
    + +
    +
    Inherits:
    +
    cd_nagios::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/client/target.pp +
    +
    +
    + +

    Summary

    + CLass manages Nagios targets for cd_nagios. + +

    Overview

    +
    +
    + +

    cd_nagios::client::target.pp +Module name: nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com) +License: + This file is part of nagios.

    + +

    nagios is used for providing automatic configuration of Nagios targets. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.

    + +

    This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.

    + +

    You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.

    + +
    +
    +
    + + +
    + + + + + +
    +
    +
    +
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +36
    +37
    +38
    +39
    +40
    +41
    +42
    +43
    +44
    +45
    +46
    +47
    +48
    +49
    +50
    +51
    +52
    +53
    +54
    +55
    +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
    +87
    +88
    +89
    +90
    +91
    +92
    +93
    +94
    +95
    +96
    +97
    +98
    +99
    +100
    +101
    +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
    +
    +
    # File 'manifests/client/target.pp', line 23
    +
    +class cd_nagios::client::target (
    +
    +
    +) inherits cd_nagios::params {
    +
    +  if $::fqdn != $ng_nagios_server {
    +
    +    @@nagios_host { $::fqdn:
    +        ensure              =>  $ng_ping_ensure,
    +        alias               =>  $::hostname,
    +        address             =>  $::fqdn,
    +        use                 =>  'linux-server',
    +        target              =>  $ng_target_host,
    +        hostgroups          =>  'linux-servers',
    +        contacts            =>  'ops',
    +        max_check_attempts  =>  $max_check_attempts,
    +        notification_period =>  '24x7',
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +        check_command       =>  "check_ping!${ng_ping_warn}!${ng_ping_crit}",
    +        notify              =>  Service['nagios'],
    +    }
    +
    +    @@nagios_service { "root_partition_${::hostname}":
    +        ensure              =>  $ng_disk_ensure,
    +        check_command       =>  "check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/",
    +        use                 =>  'generic-service',
    +        host_name           =>  $::fqdn,
    +        contacts            =>  'ops',
    +        notification_period =>  '24x7',
    +        service_description =>  "${::hostname}_root_partition",
    +        servicegroups       =>  'linux-services',
    +        target              =>  $ng_target_service,
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +    }
    +
    +    @@nagios_service { "Swap_Usage_${::hostname}":
    +        ensure              =>  $ng_swap_ensure,
    +        check_command       =>  "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
    +        use                 =>  'generic-service',
    +        host_name           =>  $::fqdn,
    +        contacts            =>  'ops',
    +        notification_period =>  '24x7',
    +        service_description =>  "${::hostname}_swap_usage",
    +        servicegroups       =>  'linux-services',
    +        target              =>  $ng_target_service,
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +    }
    +
    +    @@nagios_service { "Local_Users_${::hostname}":
    +        ensure              =>  $ng_users_ensure,
    +        check_command       =>  "check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}",
    +        use                 =>  'generic-service',
    +        host_name           =>  $::fqdn,
    +        contacts            =>  'ops',
    +        notification_period =>  '24x7',
    +        service_description =>  "${::hostname}_local_users",
    +        servicegroups       =>  'linux-services',
    +        target              =>  $ng_target_service,
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +    }
    +
    +    @@nagios_service { "Total Processes_${::hostname}":
    +        ensure              =>  $ng_procs_tot_ens,
    +        check_command       =>  "check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}",
    +        use                 =>  'generic-service',
    +        host_name           =>  $::fqdn,
    +        contacts            =>  'ops',
    +        notification_period =>  '24x7',
    +        service_description =>  "${::hostname}_total_processes",
    +        servicegroups       =>  'linux-services',
    +        target              =>  $ng_target_service,
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +    }
    +
    +    @@nagios_service { "Zombie Processes_${::hostname}":
    +        ensure              =>  $ng_procs_z_ensure,
    +        check_command       =>  "check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}",
    +        use                 =>  'generic-service',
    +        host_name           =>  $::fqdn,
    +        contacts            =>  'ops',
    +        notification_period =>  '24x7',
    +        service_description =>  "${::hostname}_zombie_processes",
    +        servicegroups       =>  'linux-services',
    +        target              =>  $ng_target_service,
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +    }
    +
    +    @@nagios_service { "Current_Load_${::hostname}":
    +        ensure              =>  $ng_load_ensure,
    +        check_command       =>  "check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}",
    +        use                 =>  'generic-service',
    +        host_name           =>  $::fqdn,
    +        contacts            =>  'ops',
    +        notification_period =>  '24x7',
    +        service_description =>  "${::hostname}_current_load",
    +        servicegroups       =>  'linux-services',
    +        target              =>  $ng_target_service,
    +        owner               =>  'nagios',
    +        group               =>  'nagios',
    +        mode                =>  '0664',
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file 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 48a5e95..13a7273 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 099126e..1786747 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 ad0e190..ee4b5ef 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 2ddc17a..2fe8f67 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 ca960dc..81cca77 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 48f6f66..fe1ded2 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aparams.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aparams.html @@ -77,6 +77,8 @@ cd_nagios::server::files
    + cd_nagios::client::target
    + cd_nagios::selinux::config
    cd_nagios::server::service
    @@ -1820,10 +1822,36 @@ enabled.

    -

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

    +

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

    +
    + +
  • + +
  • + + ng_required_ips + + + (array) + + + (defaults to: ['127.0.0.0/8']) + + + — +
    +

    Array 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

  • @@ -1845,9 +1873,6 @@ configuration file.

     
     
    -201
    -202
    -203
     204
     205
     206
    @@ -2001,10 +2026,14 @@ configuration file.

    354 355 356 -357
    +357 +358 +359 +360 +361 -
    # File 'manifests/params.pp', line 201
    +        
    # File 'manifests/params.pp', line 204
     
     class cd_nagios::params (
     
    @@ -2114,6 +2143,7 @@ $ng_use_selinux_tools = true,
     
     # httpd
     $ng_required_hosts    = [''],
    +$ng_required_ips      = ['127.0.0.0/8'],
     
     ) {
     
    @@ -2170,7 +2200,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 9a1c57a..fb9a47e 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 a8c85c1..f41565e 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 2298ca2..1df61f4 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 479b7a6..ada8a07 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 ca1b1b1..e3f13f8 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
    @@ -121,12 +121,17 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

    ng_htpasswd_user - (Any) + (string) (defaults to: undef) + — +
    +

    user name for the /etc/nagios/passwd file

    +
    +
  • @@ -134,12 +139,18 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

    ng_htpasswd_password - (Any) + (string) (defaults to: undef) + — +
    +

    the encrypted password for the +/etc/nagios/passwd file.

    +
    +
  • @@ -152,9 +163,6 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

     
     
    -23
    -24
    -25
     26
     27
     28
    @@ -174,10 +182,13 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

    42 43 44 -45
    +45 +46 +47 +48
    -
    # File 'manifests/server/access.pp', line 23
    +        
    # File 'manifests/server/access.pp', line 26
     
     define cd_nagios::server::access (
     
    @@ -209,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 807736a..b3b4867 100644
    --- a/doc/top-level-namespace.html
    +++ b/doc/top-level-namespace.html
    @@ -90,7 +90,7 @@
     
     
           
    diff --git a/manifests/client/target.pp b/manifests/client/target.pp
    index 7ddeee6..b35af5c 100644
    --- a/manifests/client/target.pp
    +++ b/manifests/client/target.pp
    @@ -41,7 +41,7 @@ class cd_nagios::client::target (
             group               =>  'nagios',
             mode                =>  '0664',
             check_command       =>  "check_ping!${ng_ping_warn}!${ng_ping_crit}",
    -        notify              =>  Service ['nagios'],
    +        notify              =>  Service['nagios'],
         }
     
         @@nagios_service { "root_partition_${::hostname}":
    diff --git a/manifests/params.pp b/manifests/params.pp
    index df74e86..7a0e6ea 100644
    --- a/manifests/params.pp
    +++ b/manifests/params.pp
    @@ -194,9 +194,12 @@
     #   "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_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
     ###############################################################################
     class cd_nagios::params (
     
    @@ -306,6 +309,7 @@ $ng_use_selinux_tools = true,
     
     # httpd
     $ng_required_hosts    = [''],
    +$ng_required_ips      = ['127.0.0.0/8'],
     
     ) {
     
    diff --git a/manifests/server/access.pp b/manifests/server/access.pp
    index 6637997..14d1c7a 100644
    --- a/manifests/server/access.pp
    +++ b/manifests/server/access.pp
    @@ -19,6 +19,9 @@
     #    You should have received a copy of the GNU General Public License
     #    along with this program.  If not, see .
     # @summary  Define manages user- and password rules for accessing nagios.
    +# @param  [string]  ng_htpasswd_user user name for the /etc/nagios/passwd file
    +# @param  [string]  ng_htpasswd_password the encrypted password for the
    +#   /etc/nagios/passwd file.
     ##############################################################################
     define cd_nagios::server::access (
     
    diff --git a/templates/httpd/nagios_conf.erb b/templates/httpd/nagios_conf.erb
    index 92bd19d..8337061 100644
    --- a/templates/httpd/nagios_conf.erb
    +++ b/templates/httpd/nagios_conf.erb
    @@ -19,10 +19,14 @@ ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
        = 2.3>
           
              Require all granted
    -         Require local
    +<% if @ng_required_hosts != '' -%>
     <% @ng_required_hosts.each do |required_host| -%>
              Require host <%= required_host %>
    -<% end -%>
    +<% end end -%>
    +<% if @ng_required_ips != '' -%>
    +<% @ng_required_ips.each do |required_ips| -%>
    +         Require ip <%= required_ips %>
    +<% end end -%>
              AuthName "Nagios Access"
              AuthType Basic
              AuthUserFile /etc/nagios/passwd
    @@ -52,11 +56,14 @@ Alias /nagios "/usr/share/nagios/html"
        = 2.3>
           
              Require all granted
    -         Require local
    +<% if @ng_required_hosts != '' -%>
     <% @ng_required_hosts.each do |required_host| -%>
              Require host <%= required_host %>
    -<% end -%>
    -
    +<% end end -%>
    +<% if @ng_required_ips != '' %>
    +<% @ng_required_ips.each do |required_ips| -%>
    +         Require ip <%= required_ips %>
    +<% end end -%>
              AuthName "Nagios Access"
              AuthType Basic
              AuthUserFile /etc/nagios/passwd