diff --git a/CHANGELOG.md b/CHANGELOG.md index 8207a98..48001be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog.

No issue

+921eeddd761dc4c Jenkins ConfDroid 2018-04-10 11:21:33 +

+

recommit for updates in build 3

+ +

+1118729c9640ecb Arne Teuke 2018-04-10 11:20:56 +

+

updates README

+ +

62260e329bcf99e Jenkins ConfDroid 2018-04-10 11:06:02

recommit for updates in build 2

diff --git a/README.md b/README.md index 3001aa3..bcd7bf5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ |Repo Name| version | Build Status| |---|---|---|---| -|`cd_apache`| 0.0.1.7 | [![Build Status](https://pipelines.confdroid.com/buildStatus/icon?job=cd_apache)](https://pipelines.confdroid.com/job/cd_apache/)| +|`cd_apache`| 0.0.1.8 | [![Build Status](https://pipelines.confdroid.com/buildStatus/icon?job=cd_apache)](https://pipelines.confdroid.com/job/cd_apache/)| ### Synopsis `Apache httpd` is a very powerful and widely used web server. @@ -40,7 +40,7 @@ Configuration * file system permissions * selinux context * manage firewall settings (optional) - +* manage nagios monitoring (optional) Maintenance * manage the service diff --git a/REPOSTRUCTURE.md b/REPOSTRUCTURE.md index 8b13789..09f43e7 100644 --- a/REPOSTRUCTURE.md +++ b/REPOSTRUCTURE.md @@ -1 +1,59 @@ +. +|-- doc +| |-- css +| | |-- common.css +| | |-- full_list.css +| | `-- style.css +| |-- js +| | |-- app.js +| | |-- full_list.js +| | `-- jquery.js +| |-- puppet_classes +| | |-- cd_apache_3A_3Amain_3A_3Aconfig.html +| | |-- cd_apache_3A_3Aparams.html +| | |-- cd_apache_3A_3Aserver_3A_3Adirs.html +| | |-- cd_apache_3A_3Aserver_3A_3Afiles.html +| | |-- cd_apache_3A_3Aserver_3A_3Ainstall.html +| | |-- cd_apache_3A_3Aserver_3A_3Aservice.html +| | |-- cd_apache_3A_3Aserver_3A_3Auser.html +| | `-- cd_apache.html +| |-- file.README.html +| |-- frames.html +| |-- _index.html +| |-- index.html +| |-- puppet_class_list.html +| `-- top-level-namespace.html +|-- examples +| |-- vhost.erb +| `-- vhost_ssl.erb +|-- manifests +| |-- main +| | `-- config.pp +| |-- monitoring +| | `-- target.pp +| |-- server +| | |-- dirs.pp +| | |-- files.pp +| | |-- install.pp +| | |-- service.pp +| | `-- user.pp +| |-- init.pp +| `-- params.pp +|-- templates +| |-- autoindex_conf.erb +| |-- httpd_conf.erb +| |-- magic.erb +| |-- ssl_conf.erb +| |-- userdir_conf.erb +| `-- welcome.conf +|-- tests +| `-- UTF_Files +|-- CHANGELOG.md +|-- Gemfile +|-- Gemfile.lock +|-- Jenkinsfile +|-- LICENSE +|-- README.md +`-- REPOSTRUCTURE.md +11 directories, 45 files diff --git a/doc/_index.html b/doc/_index.html index ec4fe69..280e922 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -78,6 +78,11 @@ +
  • + cd_apache::monitoring::target + +
  • +
  • cd_apache::params diff --git a/doc/file.README.html b/doc/file.README.html index ce4fd1b..bd2ab9c 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -61,7 +61,7 @@

    |Repo Name| version | Build Status| |---|---|---|---| -|cd_apache| 0.0.1.7 | cd_apache| 0.0.1.8 | {Build Status/]|

    @@ -133,10 +133,12 @@ structure (optional) * file system permissions * selinux context -* manage firewall settings (optional)

    - -

    Maintenance -* manage the service

    +* manage firewall settings +(optional) +* manage nagios monitoring (optional) +Maintenance +* manage the +service

    vHosts

    diff --git a/doc/index.html b/doc/index.html index 71b1e80..21a3665 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,7 +61,7 @@

    |Repo Name| version | Build Status| |---|---|---|---| -|cd_apache| 0.0.1.7 | cd_apache| 0.0.1.8 | {Build Status/]|

    @@ -133,10 +133,12 @@ structure (optional) * file system permissions * selinux context -* manage firewall settings (optional)

    - -

    Maintenance -* manage the service

    +* manage firewall settings +(optional) +* manage nagios monitoring (optional) +Maintenance +* manage the +service

    vHosts

    diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html index a03ca9a..144e4ca 100644 --- a/doc/puppet_class_list.html +++ b/doc/puppet_class_list.html @@ -50,42 +50,49 @@
  • -
  • +
  • +
    + cd_apache::monitoring::target +
    +
  • + + +
  • cd_apache::params
  • -
  • +
  • cd_apache::server::dirs
  • -
  • +
  • cd_apache::server::files
  • -
  • +
  • cd_apache::server::install
  • -
  • +
  • cd_apache::server::service
  • -
  • +
  • cd_apache::server::user
    diff --git a/doc/puppet_classes/cd_apache_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_apache_3A_3Amain_3A_3Aconfig.html index 56ec056..f81f4e8 100644 --- a/doc/puppet_classes/cd_apache_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_apache_3A_3Amain_3A_3Aconfig.html @@ -144,7 +144,7 @@ class cd_apache::main::config ( ) inherits cd_apache::params { include cd_apache::server::service - + include cd_apache::monitoring::target } diff --git a/doc/puppet_classes/cd_apache_3A_3Amonitoring_3A_3Atarget.html b/doc/puppet_classes/cd_apache_3A_3Amonitoring_3A_3Atarget.html new file mode 100644 index 0000000..f8b7603 --- /dev/null +++ b/doc/puppet_classes/cd_apache_3A_3Amonitoring_3A_3Atarget.html @@ -0,0 +1,195 @@ + + + + + + + Puppet Class: cd_apache::monitoring::target + + — Documentation by YARD 0.9.12 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: cd_apache::monitoring::target

    +
    + +
    +
    Inherits:
    +
    cd_apache::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/monitoring/target.pp +
    +
    +
    + +

    Summary

    + class manages exports for nagios monitoring + +

    Overview

    +
    +
    + +

    cd_apache::monitoring::target.pp +Module name: cd_apache +Author: Arne Teuke +(arne_teuke@puppetsoft.com) +License: + This file is part of cd_apache.

    + +

    cd_apache is used for providing automatic configuration of + <service / +purpose> + Copyright (C) 2014 PuppetSoft (copyright@puppetsoft.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/.

    + +
    +
    +
    + + +
    + + + + + +
    +
    +
    +
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +36
    +37
    +38
    +39
    +40
    +41
    +42
    +43
    +44
    +45
    +46
    +47
    +
    +
    # File 'manifests/monitoring/target.pp', line 24
    +
    +class cd_apache::monitoring::target (
    +
    +) inherits cd_apache::params {
    +
    +  case $ae_incl_target {
    +
    +    false: { notify {'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
    +    }
    +    default: {
    +      @@nagios_service { "check_http_${::hostname}":
    +        check_command       => 'check_http',
    +        use                 => 'generic-service',
    +        host_name           => $::fqdn,
    +        notification_period => '24x7',
    +        service_description => "${::hostname}_check_http",
    +        target              =>  $ae_target_service,
    +        owner               => 'nagios',
    +        group               => 'nagios',
    +        mode                => '6640',
    +        contacts            => 'ops',
    +      }
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/cd_apache_3A_3Aparams.html b/doc/puppet_classes/cd_apache_3A_3Aparams.html index bae4277..0db5a45 100644 --- a/doc/puppet_classes/cd_apache_3A_3Aparams.html +++ b/doc/puppet_classes/cd_apache_3A_3Aparams.html @@ -79,6 +79,8 @@ cd_apache::server::service
    + cd_apache::monitoring::target
    + @@ -380,6 +382,37 @@ disabled.

  • +
  • + + ae_incl_target + + + (boolean) + + + (defaults to: true) + + + — +
    +

    whether or not to allow nagios monitoring.

    +
    + +
  • + +
  • + + ae_target_service + + + (Any) + + + (defaults to: '/etc/nagios/conf.d/httpd_service.cfg') + + +
  • + @@ -390,7 +423,6 @@ disabled.

     
     
    -58
     59
     60
     61
    @@ -451,10 +483,15 @@ disabled.

    116 117 118 -119
    +119 +120 +121 +122 +123 +124 -
    # File 'manifests/params.pp', line 58
    +        
    # File 'manifests/params.pp', line 59
     
     class cd_apache::params (
     
    @@ -474,6 +511,10 @@ $ae_manage_cfg      = false,
     $ae_manage_dirs     = true,
     $ae_allow_user_dirs = false,
     
    +# nagios
    +$ae_incl_target     = true,
    +$ae_target_service  = '/etc/nagios/conf.d/httpd_service.cfg',
    +
     ) {
     
     # installation section
    diff --git a/manifests/main/config.pp b/manifests/main/config.pp
    index 4e18fcc..c23d2e7 100644
    --- a/manifests/main/config.pp
    +++ b/manifests/main/config.pp
    @@ -26,5 +26,5 @@ class cd_apache::main::config (
     ) inherits cd_apache::params {
     
       include cd_apache::server::service
    -
    +  include cd_apache::monitoring::target
     }
    diff --git a/manifests/monitoring/target.pp b/manifests/monitoring/target.pp
    new file mode 100644
    index 0000000..3ce65af
    --- /dev/null
    +++ b/manifests/monitoring/target.pp
    @@ -0,0 +1,47 @@
    +## cd_apache::monitoring::target.pp
    +# Module name: cd_apache
    +# Author: Arne Teuke (arne_teuke@puppetsoft.com)
    +# License:
    +#    This file is part of cd_apache.
    +#
    +#    cd_apache is used for providing automatic configuration of
    +#    
    +#    Copyright (C) 2014  PuppetSoft (copyright@puppetsoft.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 .
    +# @summary class manages exports for nagios monitoring
    +##############################################################################
    +class cd_apache::monitoring::target (
    +
    +) inherits cd_apache::params {
    +
    +  case $ae_incl_target {
    +
    +    false: { notify {'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
    +    }
    +    default: {
    +      @@nagios_service { "check_http_${::hostname}":
    +        check_command       => 'check_http',
    +        use                 => 'generic-service',
    +        host_name           => $::fqdn,
    +        notification_period => '24x7',
    +        service_description => "${::hostname}_check_http",
    +        target              =>  $ae_target_service,
    +        owner               => 'nagios',
    +        group               => 'nagios',
    +        mode                => '6640',
    +        contacts            => 'ops',
    +      }
    +    }
    +  }
    +}
    diff --git a/manifests/params.pp b/manifests/params.pp
    index caee414..62ea1c6 100644
    --- a/manifests/params.pp
    +++ b/manifests/params.pp
    @@ -54,6 +54,7 @@
     # @param  [boolean] ae_allow_user_dirs Whether or not to allow user directories
     #   should be allowed to share content through httpd. Usually this is a security
     #   problem and as such should be disabled.
    +# @param  [boolean] ae_incl_target whether or not to allow nagios monitoring.
     ##############################################################################
     class cd_apache::params (
     
    @@ -73,6 +74,10 @@ $ae_manage_cfg      = false,
     $ae_manage_dirs     = true,
     $ae_allow_user_dirs = false,
     
    +# nagios
    +$ae_incl_target     = true,
    +$ae_target_service  = '/etc/nagios/conf.d/httpd_service.cfg',
    +
     ) {
     
     # installation section
    diff --git a/tests/UTF_Files b/tests/UTF_Files
    index 066e577..a138597 100644
    --- a/tests/UTF_Files
    +++ b/tests/UTF_Files
    @@ -4,4 +4,3 @@
     ./.yardoc/objects/root.dat: data
     ./doc/css/style.css: HTML document, UTF-8 Unicode text, with very long lines
     ./doc/js/jquery.js: HTML document, UTF-8 Unicode text, with very long lines
    -./REPOSTRUCTURE.md: very short file (no magic)