Mumble - moduli


Mumble - Asentaa Mumble-server:n ja ylläpitää sitä.


Ladattavissa täältä.

Käyttöjärjestelmät:

Testattu seuraavilla käyttöjärjestelmillä:


Xubuntu 12.10 32-bit

Ubuntu 12.04 LTS 64-bit

Debian 6.0 64-bit


Rakenne:

mumble
├── manifests
│   ├── config.pp
│   ├── init.pp
│   ├── install.pp
│   ├── params.pp
│   └── service.pp
├── README
└── templates
    └── mumble-server.ini.erb

README

#########################
# Puppet module: mumble #
#########################

This module installs and manages mumble-server.

######################
# TODO before using  #
######################

Check mumble::params for wanted specifications.

################
# Sample usage #
################

include mumble

##########
# Author #
##########

Made by Sampo Tyllilä <sampo.tyllila@gmail.com>

###########
# License #
###########

This software is distributed under the GNU General Public License version 2 or any later version.
http://www.gnu.org/licenses/

Manifests kansion sisältö:


init.pp

# == Class: mumble
#
# This module manages mumble-server.
#
# === Parameters
#
# [*package*]     - The name of the package to install.
# [*service*]     - The name of the managed service.
# [*config*]      - The config to use with mumble-server.
# [*password*]    - The password to the mumble-server.
# [*port*]        - The port to listen.
# [*bandwidth*]   - The bandwidth of the mumble-server
# [*users*]       - The number of users allowed to the mumble-server.
# [*welcometext*] - The welcometext appearing when connecting the mumble-server.
#
# === Examples
#
# See README for details.
#
# === Author
#
# Sampo Tyllilä 
#
class mumble (
        $package     = $mumble::params::package,
        $service     = $mumble::params::service,
        $config      = $mumble::params::config,
        $password    = $mumble::params::password,
        $port        = $mumble::params::port,
        $bandwidth   = $mumble::params::bandwidth,
        $users       = $mumble::params::users,
        $welcometext = $mumble::params::welcometext
)       inherits mumble::params {

        include mumble::params, mumble::install, mumble::service, mumble::config

}

install.pp

# == Class: mumble::install
#
# This module installs mumble-server.
#
# === Parameters
#
# [*package*] - The name of the package to install.
#
# === Author
#
# Sampo Tyllilä 
#
class mumble::install {
        package { $package:
                ensure     => latest,
        }
}

service.pp

# == Class: mumble::service
#
# This class manages mumble-server service.
#
# === Parameters
#
# [*service*] - The name of the managed service.
#
# === Requires
#
# The mumble::install class.
#
# === Author
#
# Sampo Tyllilä 
#
class mumble::service {
        service { $service:
                ensure  => running,
                enable  => true,
                require => Class['mumble::install'],
        }
}

config.pp

# == Class: mumble::config
#
# This class manages '/etc/mumble-server.ini'.
#
# === Parameters
#
# No parameters in this class.
#
# === Requires
#
# The mumble::install class.
#
# === Notifies
#
# The mumble::service class.
#
# === Author
#
# Sampo Tyllilä 
#
class mumble::config {
        file { '/etc/mumble-server.ini':
                ensure  => present,
                content => template('mumble/mumble-server.ini.erb'),
                owner   => 'root',
                group   => 'mumble-server',
                mode    => '0640',
                require => Class['mumble::install'],
                notify  => Class['mumble::service'],
        }
}

params.pp

# == Class: mumble::params
#
# This class manages the parameters of this mumble module.
#
# === Parameters
#
# [*package*]     - The name of the package to install.
# [*service*]     - The name of the managed service.
# [*config*]      - The config to use with mumble-server.
# [*password*]    - The password to the mumble-server.
# [*port*]        - The port to listen.
# [*bandwidth*]   - The bandwidth of the mumble-server
# [*users*]       - The number of users allowed to the mumble-server.
# [*welcometext*] - The welcometext appearing when connecting the mumble-server.
#
# === Author
#
# Sampo Tyllilä 
#
class mumble::params {
        $package     = 'mumble-server'
        $service     = 'mumble-server'
        $config      = '/etc/mumble-server.ini'
        $password    = ''
        $bandwidth   = '72000'
        $port        = '64738'
        $users       = '20'
        $welcometext = "Welcome to the Mumble-Server!"
}

Templates kansion sisältö:


mumble-server.ini.erb

database=/var/lib/mumble-server/mumble-server.sqlite
dbus=system
ice="tcp -h 127.0.0.1 -p 6502"
icesecretwrite=
logfile=/var/log/mumble-server/mumble-server.log
pidfile=/var/run/mumble-server/mumble-server.pid
welcometext=<%= welcometext %>
port=<%= port %>
serverpassword=<%= password %>
bandwidth=<%= bandwidth %>
users=<%= users %>
uname=mumble-server
[Ice]
Ice.Warn.UnknownProperties=1
Ice.MessageSizeMax=65536