Merge pull request #1 from derekhiggins/adding-params

Adding name of the httpd service as a param
This commit is contained in:
Dan Bode 2012-04-18 08:01:25 -07:00
commit fd51aeebe1
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")
}
}
}