Permalink
Browse files

Updates and cleanups

  • Loading branch information...
1 parent 1e300d5 commit fbd7c386efb57f2520fceb28abfdc6e464c4027e @alvagante alvagante committed Dec 2, 2012
View
@@ -58,9 +58,6 @@
[submodule "openntpd"]
path = openntpd
url = https://github.com/example42/puppet-openntpd
-[submodule "DOCS"]
- path = DOCS
- url = https://github.com/example42/Example42-documentation
[submodule "nrpe"]
path = nrpe
url = https://github.com/example42/puppet-nrpe
@@ -193,3 +190,21 @@
[submodule "vim"]
path = vim
url = https://github.com/example42/puppet-vim
+[submodule "Example42-templates"]
+ path = Example42-templates
+ url = https://github.com/example42/Example42-templates
+[submodule "Example42-documentation"]
+ path = Example42-documentation
+ url = https://github.com/example42/Example42-documentation
+[submodule "freeradius"]
+ path = freeradius
+ url = https://github.com/example42/puppet-freeradius
+[submodule "django"]
+ path = django
+ url = https://github.com/example42/puppet-django
+[submodule "snmpd"]
+ path = snmpd
+ url = https://github.com/example42/puppet-snmpd
+[submodule "tinc"]
+ path = tinc
+ url = https://github.com/example42/puppet-tinc
File renamed without changes.
Submodule Example42-templates added at 8cc870
Submodule Example42-tools updated 1 files
+88 −42 module_clone.sh
1 django
Submodule django added at a959a8
1 foo
Submodule foo deleted from 405600
Submodule freeradius added at c02025
2 php
1 snmpd
Submodule snmpd added at 63cbec
View
@@ -1,7 +0,0 @@
-name 'lab42-snmpd'
-version '0.1.1'
-
-# dependency 'lab42/common', '>= 0.0.1'
-# dependency 'lab42/monitor', '>= 0.0.1'
-# dependency 'lab42/backup', '>= 0.0.1'
-# dependency 'lab42/firewall', '>= 0.0.1'
View
@@ -1,54 +0,0 @@
-Puppet module: snmpd
-
-# Written by Lab42 #
-# http://www.Example42.com
-
-Licence: Apache2
-
-DESCRIPTION:
-This module installs and manages snmpd.
-Standard and extended classes are available.
-Decide and customize how you want to define configuration files: static files, templates, infile modifications...
-
-
-USER VARIABLES:
-TODO: Prepare templates for use of specifi variables such as snmpd_version, snmpd_ro_community ...
-
-
-USAGE:
-# Standard Classes
-include snmpd # Install and run snmpd
-
-include snmpd::disable # Disable snmpd service.
-include snmpd::disableboot # Disable snmpd service at boot time, but don't stop if it's running.
-include snmpd::absent # Remove snmpd package.
-
-# Extended Classes (generally require storeconfigs)
-include snmpd::monitor # Monitor snmpd - Automatically included if $monitor=yes - Requires Example42's monitor module
-include snmpd::backup # Backup snmpd data - Automatically included if $backup=yes - Requires Example42's backup module
-include snmpd::firewall # Manages firewall rule for snmpd service - Automatically included if $firewall=yes - Requires Example42's firewall module
-
-# Generic define to set parameters in the main configuration file. EXPERIMENTAL.
-snmpd::conf { "ParameterName": value="YourValue"} # Generic
-
-# Module specific classes
-
-# Module specific defines
-
-
-GENERAL VARIABLES:
-Example42 modules collection uses some general variables that can influence the behaviour of this module.
-You can happily live without considering or setting them, but they can be useful to manage different projects maintanining the module's resuability.
-$my_project - If set, permits you to alter and customize the module behaviour
- and files's deploy logic in custom project classes than can be placed in a separated module.
-$base_source - Let you define an alternative source for static files:
- - $base_source not set -> Files are looked in puppet://$servername/ (the PuppetMaster)
- - $base_source set -> Files are looked in $base_source ( could be puppet://$servername/$my_module )
- Note that the module automatically manages the different paths for Puppet pre 0.25
-
-
-DEPENDENCIES:
-Standard classes generally don't need external modules.
-Extended classes need the relevant external modules (import monitor ; import backup ... ) and the "common" module (import common)
-snmpd::conf generic infile configuration define needs the "common" module
-Check on individual module specific classes and defines if there are specific requirements.
View
@@ -1,12 +0,0 @@
-# Class: snmpd::absent
-#
-# Removes snmpd package
-#
-# Usage:
-# include snmpd::absent
-#
-class snmpd::absent inherits snmpd {
- Package["snmpd"] {
- ensure => "absent" ,
- }
-}
View
@@ -1,41 +0,0 @@
-# Class: snmpd::backup
-#
-# Backups snmpd data and logs using Example42 backup meta module (to be adapted to custom backup solutions)
-# It's automatically included and used if $backup=yes
-# This class permits to abstract what you want to backup from the tool and module to use for backups.
-#
-# Variables:
-# The behaviour of this class has some defaults that can be overriden by user's variables:
-# $snmpd_backup_data (true|false) : Set if you want to backup snmpd's data. Default: As defined in $backup_data
-# $snmpd_backup_log (true|false) : Set if you want to backup snmpd's logs. Default: As defined in $backup_log
-# $snmpd_backup_frequency (hourly|daily|weekly|monthly) : Set the frequency of your snmpd backups. Default: daily.
-# $snmpd_backup_target : Define how to reach (Ip, fqdn...) this host to backup snmpd from an external server. Default: As defined in $backup_target
-#
-# You can also set some site wide variables that can be overriden by the above module specific ones:
-# $backup_data (true|false) : Set if you want to enable data backups site-wide.
-# $backup_log (true|false) : Set if you want to enable logs backups site-wide.
-# $backup_target : Set the ip/hostname you want to use on an external backup server to backup this host
-# For the defaults of the above variables check snmpd::params
-#
-# Usage:
-# Automatically included if $backup=yes
-#
-class snmpd::backup {
-
- include snmpd::params
-
- backup { "snmpd_data":
- frequency => "${snmpd::params::backup_frequency}",
- path => "${snmpd::params::datadir}",
- enabled => "${snmpd::params::backup_data_enable}",
- target => "${snmpd::params::backup_target_real}",
- }
-
- backup { "snmpd_logs":
- frequency => "${snmpd::params::backup_frequency}",
- path => "${snmpd::params::logdir}",
- enabled => "${snmpd::params::backup_log_enable}",
- target => "${snmpd::params::backup_target_real}",
- }
-
-}
View
@@ -1,23 +0,0 @@
-# Define snmpd::conf
-#
-# General snmpd main configuration file's inline modification define
-# Use with caution, it's still at experimental stage and may break in untested circumstances
-# Engine, pattern end line parameters can be tweaked for better behaviour
-#
-# Usage:
-# snmpd::conf { "mynetworks": value => "127.0.0.0/8 10.42.42.0/24" }
-#
-define snmpd::conf ($value) {
-
- require snmpd::params
-
- config { "snmpd_conf_$name":
- file => "${snmpd::params::configfile}",
- line => "$name = $value",
- pattern => "^$name ",
- engine => "replaceline",
- notify => Service["snmpd"],
- require => File["snmpd.conf"],
- }
-
-}
View
@@ -1,25 +0,0 @@
-#
-# Class: snmpd::debug
-#
-# This class is used only for debugging purposes
-#
-# Usage:
-# This class is used if you set $debug=yes
-#
-class snmpd::debug {
-
- # Load the variables used in this module. Check the params.pp file
- require snmpd::params
- include puppet::params
-
- file { "puppet_debug_variables_snmpd":
- path => "${puppet::params::debugdir}/variables/snmpd",
- mode => "${snmpd::params::configfile_mode}",
- owner => "${snmpd::params::configfile_owner}",
- group => "${snmpd::params::configfile_group}",
- ensure => present,
- require => File["puppet_debug_variables"],
- content => template("snmpd/variables_snmpd.erb"),
- }
-
-}
View
@@ -1,13 +0,0 @@
-# Class: snmpd::disable
-#
-# Stops snmpd service and disables it at boot time
-#
-# Usage:
-# include snmpd::disable
-#
-class snmpd::disable inherits snmpd {
- Service["snmpd"] {
- ensure => "stopped" ,
- enable => "false",
- }
-}
@@ -1,13 +0,0 @@
-# Class: snmpd::disableboot
-#
-# This class disables snmpd startup at boot time but doesn't check if the service is running
-# Useful when the service is started but another applications (such as a Cluster suite)
-#
-# Usage:
-# include snmpd::disableboot
-#
-class snmpd::disableboot inherits snmpd {
- Service["snmpd"] {
- enable => "false",
- }
-}
@@ -1,24 +0,0 @@
-# Class: snmpd::firewall
-#
-# Manages snmpd firewalling using custom Firewall wrapper
-# By default it opens snmpd's default port(s) to anybody
-# It's automatically included if $firewall=yes
-#
-# Usage:
-# Automatically included if $firewall=yes
-#
-class snmpd::firewall {
-
- include snmpd::params
-
- firewall { "snmpd_${snmpd::params::protocol}_${snmpd::params::port}":
- source => "${snmpd::params::firewall_source_real}",
- destination => "${snmpd::params::firewall_destination_real}",
- protocol => "${snmpd::params::protocol}",
- port => "${snmpd::params::port}",
- action => "allow",
- direction => "input",
- }
-
-}
-
View
@@ -1,60 +0,0 @@
-#
-# Class: snmpd
-#
-# Manages snmpd.
-# Include it to install and run snmpd
-# It defines package, service, main configuration file.
-#
-# Usage:
-# include snmpd
-#
-class snmpd {
-
- # Load the variables used in this module. Check the params.pp file
- require snmpd::params
-
- # Basic Package - Service - Configuration file management
- package { "snmpd":
- name => "${snmpd::params::packagename}",
- ensure => present,
- }
-
- service { "snmpd":
- name => "${snmpd::params::servicename}",
- ensure => running,
- enable => true,
- hasrestart => true,
- hasstatus => "${snmpd::params::hasstatus}",
- pattern => "${snmpd::params::processname}",
- require => Package["snmpd"],
- subscribe => File["snmpd.conf"],
- }
-
- file { "snmpd.conf":
- path => "${snmpd::params::configfile}",
- mode => "${snmpd::params::configfile_mode}",
- owner => "${snmpd::params::configfile_owner}",
- group => "${snmpd::params::configfile_group}",
- ensure => present,
- require => Package["snmpd"],
- notify => Service["snmpd"],
- # content => template("snmpd/snmpd.conf.erb"),
- }
-
- # Include OS specific subclasses, if necessary
- case $operatingsystem {
- default: { }
- }
-
- # Include extended classes, if
- if $backup == "yes" { include snmpd::backup }
- if $monitor == "yes" { include snmpd::monitor }
- if $firewall == "yes" { include snmpd::firewall }
-
- # Include project specific class if $my_project is set
- if $my_project { include "snmpd::${my_project}" }
-
- # Include debug class is debugging is enabled ($debug=yes)
- if ( $debug == "yes" ) or ( $debug == true ) { include snmpd::debug }
-
-}
Oops, something went wrong.

0 comments on commit fbd7c38

Please sign in to comment.