2013-05-29 17:36:53 +02:00
|
|
|
# Class: apache
|
|
|
|
#
|
|
|
|
# This class installs the apache server.
|
|
|
|
#
|
|
|
|
# Parameters:
|
|
|
|
#
|
|
|
|
# Actions:
|
|
|
|
#
|
|
|
|
# Requires:
|
|
|
|
#
|
|
|
|
# Sample Usage:
|
|
|
|
#
|
|
|
|
# include apache
|
|
|
|
#
|
|
|
|
class apache {
|
|
|
|
|
|
|
|
$apache = $::operatingsystem ? {
|
|
|
|
/(Debian|Ubuntu)/ => 'apache2',
|
|
|
|
/(RedHat|CentOS|Fedora)/ => 'httpd'
|
|
|
|
}
|
|
|
|
|
|
|
|
package { $apache:
|
|
|
|
ensure => installed,
|
|
|
|
alias => 'apache'
|
|
|
|
}
|
|
|
|
|
|
|
|
service { $apache:
|
|
|
|
ensure => running,
|
2013-06-03 17:54:44 +02:00
|
|
|
alias => 'apache',
|
2013-05-29 17:36:53 +02:00
|
|
|
require => Package['apache']
|
|
|
|
}
|
|
|
|
}
|