Module `apache': add user `apache'

refs #6842
This commit is contained in:
Alexander Klimov 2014-09-10 11:38:10 +02:00
parent a33042bcc9
commit 5e3f60d42b
1 changed files with 11 additions and 3 deletions

View File

@ -13,20 +13,28 @@
# 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 => installed,
alias => 'apache'
alias => 'apache',
}
service { $apache:
ensure => running,
alias => 'apache',
require => Package['apache']
require => Package['apache'],
}
user { $user:
alias => 'apache',
}
}