Skip to content

Instantly share code, notes, and snippets.

@anderiv
Created June 27, 2012 21:15
Show Gist options
  • Save anderiv/3006908 to your computer and use it in GitHub Desktop.
Save anderiv/3006908 to your computer and use it in GitHub Desktop.
server-classes.pp
#############################
# Base Server Class
#############################
class server::base {
# User Management
include org::users
realize (
Users::Virtual::Localuser["user3"],
)
# utility packages
include ntp
class { 'sysstat': sardays => '30' }
class { 'resolver':
dns_domain => [ 'example.com' ],
dns_servers => [ '172.16.0.23'],
search => [ 'example.com' , 'example2.com' ],
}
}
#############################
# Web-Frontend Server Class
#############################
class server::web-frontend {
realize (
Users::Virtual::Localuser["user1"],
Users::Virtual::Localuser["user2"],
)
# Install web packages
$web-frontend-packages = [ "apache2",
"gfortran",
"apache2.2-common",
"apache2-mpm-worker",
"apache2-threaded-dev",
"libapache2-mod-wsgi",
"python-dev",
"python-mysqldb",
"python-gdcm",
"python-numpy",
"python-scipy",
"python-matplotlib",
"python-imaging" ]
package { $web-frontend-packages: }
}
#############################
# MySQL Server Class
#############################
class server::db-mysql {
$db-mysql-packages = [ "xfsprogs" ]
package { $db-mysql-packages: }
}
#############################
# RabbitMQ Server Class
#############################
class server::db-rabbitmq {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment