Import rest of modules.
This commit is contained in:
parent
02fa10f33c
commit
3f225ced9b
39 changed files with 2056 additions and 0 deletions
91
inetd/manifests/init.pp
Normal file
91
inetd/manifests/init.pp
Normal file
|
@ -0,0 +1,91 @@
|
|||
|
||||
# Install inetd server.
|
||||
#
|
||||
# This class is wrapper for installing inetd superserver.
|
||||
#
|
||||
class inetd::server {
|
||||
|
||||
case $operatingsystem {
|
||||
centos,fedora: {
|
||||
include inetd::server::xinetd
|
||||
}
|
||||
openbsd: {
|
||||
include inetd::server::inetd
|
||||
}
|
||||
default: {
|
||||
fail("Inetd module not supported in ${operatingsystem}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install xinetd server.
|
||||
#
|
||||
# This class should not be invoked directly. Instead use
|
||||
# inetd::server which installs xinetd or normal inetd
|
||||
# depending on running operatingsystem.
|
||||
#
|
||||
class inetd::server::xinetd {
|
||||
|
||||
package { "xinetd":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
service { "xinetd":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["xinetd"],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Install inetd server.
|
||||
#
|
||||
# This class should not be invoked directly. Instead use
|
||||
# inetd::server which installs xinetd or normal inetd
|
||||
# depending on running operatingsystem.
|
||||
#
|
||||
class inetd::server::inetd {
|
||||
|
||||
service { "inetd":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Configure inetd service.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# $name:
|
||||
# Service name
|
||||
# $ensure:
|
||||
# Set to present to enable service and absent to disable.
|
||||
#
|
||||
# === Sample usage
|
||||
#
|
||||
# inetd::service { "time-stream":
|
||||
# ensure => present,
|
||||
# }
|
||||
#
|
||||
define inetd::service($ensure = present) {
|
||||
|
||||
case $operatingsystem {
|
||||
centos,fedora: {
|
||||
service { "${name}":
|
||||
enable => $ensure ? {
|
||||
present => true,
|
||||
absent => false,
|
||||
},
|
||||
notify => Service["xinetd"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Inetd module not supported in ${operatingsystem}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue