Adding name of the httpd service as a param

This commit is contained in:
Derek Higgins 2012-04-18 09:58:39 +01:00
parent e479963d67
commit 2a424ce1d3
2 changed files with 19 additions and 1 deletions

View File

@ -20,7 +20,8 @@ class horizon(
}
service { 'httpd':
name => 'apache2',
name => $::horizon::params::http_service,
ensure => 'running',
subscribe => File['/etc/openstack-dashboard/local_settings.py']
}
}

View File

@ -0,0 +1,17 @@
# these parameters need to be accessed from several locations and
# should be considered to be constant
class horizon::params {
case $::osfamily {
'RedHat': {
$http_service = 'httpd'
}
'Debian': {
$http_service = 'apache2'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")
}
}
}