puppet-openstack-integration/manifests/apache.pp
Takashi Kajinami fc3f5bfbd3 Implement a common class to manage apache service
This patch introduces a new class, openstack_integration::apache, which
can be used to manage apache service in ci jobs.

Change-Id: I1d29662abe630f291fc4dbcb80d439d9e7388ce8
2020-08-07 09:14:09 +09:00

28 lines
888 B
Puppet

class openstack_integration::apache {
include openstack_integration::params
include openstack_integration::config
if ($::os['family'] == 'Debian') {
$wsgi_mod_package = 'libapache2-mod-wsgi-py3'
$wsgi_mod_lib = 'mod_wsgi.so'
}
elsif ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$wsgi_mod_package = 'python3-mod_wsgi'
$wsgi_mod_lib = 'mod_wsgi_python3.so'
}
if ($::os['family'] == 'Debian') or ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
include apache::params
class { 'apache':
mod_packages => merge($::apache::params::mod_packages, {
'wsgi' => $wsgi_mod_package,
}),
mod_libs => merge($::apache::params::mod_libs, {
'wsgi' => $wsgi_mod_lib,
})
}
}
}