icingaweb2/.puppet/modules/apache/manifests/init.pp

49 lines
752 B
Puppet
Raw Normal View History

# 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'
}
$user = $::operatingsystem ? {
/(Debian|Ubuntu)/ => 'www-data',
/(RedHat|CentOS|Fedora)/ => 'apache'
}
package { $apache:
ensure => latest,
alias => 'apache',
}
service { $apache:
ensure => running,
2014-09-30 12:04:48 +02:00
enable => true,
alias => 'apache',
require => Package['apache'],
}
package { 'mod_ssl':
ensure => latest,
notify => Service[$apache],
}
@user { $user:
alias => 'apache',
}
User <| alias == apache |>
}