Rectify static alias
On Debian platforms static files resides in /var/lib.
Fuel bug: https://bugs.launchpad.net/fuel/+bug/1672990
Change-Id: I9aef5da052ee93c27834167089f11aa215ed8447
(cherry picked from commit b5139808e3
)
This commit is contained in:
parent
d7122a17e0
commit
853f159eda
|
@ -16,6 +16,7 @@ class horizon::params {
|
|||
$httpd_config_file = '/etc/httpd/conf.d/openstack-dashboard.conf'
|
||||
$httpd_listen_config_file = '/etc/httpd/conf/httpd.conf'
|
||||
$root_url = '/dashboard'
|
||||
$static_path = '/usr/share'
|
||||
$apache_user = 'apache'
|
||||
$apache_group = 'apache'
|
||||
$wsgi_user = 'apache'
|
||||
|
@ -27,6 +28,7 @@ class horizon::params {
|
|||
$config_file = '/etc/openstack-dashboard/local_settings.py'
|
||||
$httpd_listen_config_file = '/etc/apache2/ports.conf'
|
||||
$root_url = '/horizon'
|
||||
$static_path = '/var/lib'
|
||||
$apache_user = 'www-data'
|
||||
$apache_group = 'www-data'
|
||||
$wsgi_user = 'horizon'
|
||||
|
|
|
@ -206,7 +206,7 @@ class horizon::wsgi::apache (
|
|||
priority => $priority,
|
||||
aliases => [{
|
||||
alias => "${root_url}/static",
|
||||
path => '/usr/share/openstack-dashboard/static',
|
||||
path => "${::horizon::params::static_path}/openstack-dashboard/static",
|
||||
}],
|
||||
port => $http_port,
|
||||
ssl_cert => $horizon_cert,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
fixes:
|
||||
- Rectify static alias prefix since starting from Ocata
|
||||
on Debian platforms static files resides in /var/lib.
|
|
@ -220,11 +220,11 @@ describe 'horizon::wsgi::apache' do
|
|||
it 'configures webroot alias' do
|
||||
if (Gem::Version.new(Puppet.version) >= Gem::Version.new('4.0'))
|
||||
is_expected.to contain_apache__vhost('horizon_vhost').with(
|
||||
'aliases' => [{'alias' => '/horizon/static', 'path' => '/usr/share/openstack-dashboard/static'}],
|
||||
'aliases' => [{'alias' => '/horizon/static', 'path' => '/var/lib/openstack-dashboard/static'}],
|
||||
)
|
||||
else
|
||||
is_expected.to contain_apache__vhost('horizon_vhost').with(
|
||||
'aliases' => [['alias', '/horizon/static'], ['path', '/usr/share/openstack-dashboard/static']],
|
||||
'aliases' => [['alias', '/horizon/static'], ['path', '/var/lib/openstack-dashboard/static']],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue