Merge pull request #1 from derekhiggins/adding-params
Adding name of the httpd service as a param
This commit is contained in:
commit
fd51aeebe1
@ -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