Adding name of the httpd service as a param
This commit is contained in:
parent
e479963d67
commit
2a424ce1d3
@ -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']
|
||||
}
|
||||
}
|
||||
|
17
deployment/puppet/horizon/manifests/params.pp
Normal file
17
deployment/puppet/horizon/manifests/params.pp
Normal 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")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user