Revert "Add election alias to governance.openstack.org"
This reverts commit 91dcb510ba
.
The implementation ignored that the referenced template is being
used by many vhosts but the lists for aliases and directories were
defined at (and referenced from) the containing class scope. This
coupled with the newly introduced conditional for the directories
array caused all other vhosts using this template to no longer get
Directory blocks for their docroots.
Change-Id: I808e654a6fb77440e7aecbde4456ddc720fe0d9a
This commit is contained in:
parent
5fe2d96c97
commit
a167ed03c1
@ -49,10 +49,6 @@ class openstack_project::static (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! defined(Httpd::Mod['alias']) {
|
|
||||||
httpd::mod { 'alias': ensure => present }
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! defined(File['/srv/static']) {
|
if ! defined(File['/srv/static']) {
|
||||||
file { '/srv/static':
|
file { '/srv/static':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
@ -256,16 +252,7 @@ class openstack_project::static (
|
|||||||
}
|
}
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
# Governance & Election
|
# Governance
|
||||||
|
|
||||||
# Extra aliases and directories needed for vhost template:
|
|
||||||
$aliases = {
|
|
||||||
'/election/' => '/srv/static/election/'
|
|
||||||
}
|
|
||||||
$directories = [
|
|
||||||
'/srv/static/election',
|
|
||||||
'/srv/static/governance'
|
|
||||||
]
|
|
||||||
|
|
||||||
::httpd::vhost { 'governance.openstack.org':
|
::httpd::vhost { 'governance.openstack.org':
|
||||||
port => 443, # Is required despite not being used.
|
port => 443, # Is required despite not being used.
|
||||||
@ -275,20 +262,12 @@ class openstack_project::static (
|
|||||||
template => 'openstack_project/static-http-and-https.vhost.erb',
|
template => 'openstack_project/static-http-and-https.vhost.erb',
|
||||||
vhost_name => 'governance.openstack.org',
|
vhost_name => 'governance.openstack.org',
|
||||||
require => [
|
require => [
|
||||||
File['/srv/static/election'],
|
|
||||||
File['/srv/static/governance'],
|
File['/srv/static/governance'],
|
||||||
File[$cert_file],
|
File[$cert_file],
|
||||||
File[$key_file],
|
File[$key_file],
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/srv/static/election':
|
|
||||||
ensure => directory,
|
|
||||||
owner => 'jenkins',
|
|
||||||
group => 'jenkins',
|
|
||||||
require => User['jenkins'],
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/srv/static/governance':
|
file { '/srv/static/governance':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'jenkins',
|
owner => 'jenkins',
|
||||||
|
@ -14,30 +14,12 @@
|
|||||||
RewriteRule ^/(.*)$ http://<%= @vhost_name %>/$1 [L,R=301]
|
RewriteRule ^/(.*)$ http://<%= @vhost_name %>/$1 [L,R=301]
|
||||||
<% end -%>
|
<% end -%>
|
||||||
DocumentRoot <%= @docroot %>
|
DocumentRoot <%= @docroot %>
|
||||||
|
|
||||||
<% if scope.lookupvar('openstack_project::static::aliases').is_a? Hash -%>
|
|
||||||
# Alias other folders
|
|
||||||
<% scope.lookupvar('openstack_project::static::aliases').each do |a, d| -%>
|
|
||||||
Alias "<%= a %>" "<%= d %>"
|
|
||||||
<% end -%>
|
|
||||||
<% end -%>
|
|
||||||
<% if scope.lookupvar('openstack_project::static::directories').is_a? Array -%>
|
|
||||||
<% scope.lookupvar('openstack_project::static::directories').each do |dirname| -%>
|
|
||||||
<Directory <%= dirname %>>
|
|
||||||
Options Indexes FollowSymLinks MultiViews
|
|
||||||
AllowOverride None
|
|
||||||
Satisfy Any
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
<% end -%>
|
|
||||||
<% else -%>
|
|
||||||
<Directory <%= @docroot %>>
|
<Directory <%= @docroot %>>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Satisfy Any
|
Satisfy Any
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
<% end -%>
|
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
|
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
|
||||||
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
|
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
|
||||||
|
Loading…
Reference in New Issue
Block a user