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 # include apache
# #
class apache { class apache {
$apache = $::operatingsystem ? { $apache = $::operatingsystem ? {
/(Debian|Ubuntu)/ => 'apache2', /(Debian|Ubuntu)/ => 'apache2',
/(RedHat|CentOS|Fedora)/ => 'httpd' /(RedHat|CentOS|Fedora)/ => 'httpd'
} }
$user = $::operatingsystem ? {
/(Debian|Ubuntu)/ => 'www-data',
/(RedHat|CentOS|Fedora)/ => 'apache'
}
package { $apache: package { $apache:
ensure => installed, ensure => installed,
alias => 'apache' alias => 'apache',
} }
service { $apache: service { $apache:
ensure => running, ensure => running,
alias => 'apache', alias => 'apache',
require => Package['apache'] require => Package['apache'],
}
user { $user:
alias => 'apache',
} }
} }