diff --git a/modules/openstack_project/manifests/static.pp b/modules/openstack_project/manifests/static.pp index bd06622150..fd6fd30045 100644 --- a/modules/openstack_project/manifests/static.pp +++ b/modules/openstack_project/manifests/static.pp @@ -49,10 +49,6 @@ class openstack_project::static ( } } - if ! defined(Httpd::Mod['alias']) { - httpd::mod { 'alias': ensure => present } - } - if ! defined(File['/srv/static']) { file { '/srv/static': ensure => directory, @@ -256,39 +252,22 @@ class openstack_project::static ( } ########################################################### - # Governance & Election - - # Extra aliases and directories needed for vhost template: - $aliases = { - '/election/' => '/srv/static/election/' - } - $directories = [ - '/srv/static/election', - '/srv/static/governance' - ] + # Governance ::httpd::vhost { 'governance.openstack.org': - port => 443, # Is required despite not being used. - docroot => '/srv/static/governance', - priority => '50', - ssl => true, - template => 'openstack_project/static-http-and-https.vhost.erb', - vhost_name => 'governance.openstack.org', - require => [ - File['/srv/static/election'], + port => 443, # Is required despite not being used. + docroot => '/srv/static/governance', + priority => '50', + ssl => true, + template => 'openstack_project/static-http-and-https.vhost.erb', + vhost_name => 'governance.openstack.org', + require => [ File['/srv/static/governance'], File[$cert_file], File[$key_file], ], } - file { '/srv/static/election': - ensure => directory, - owner => 'jenkins', - group => 'jenkins', - require => User['jenkins'], - } - file { '/srv/static/governance': ensure => directory, owner => 'jenkins', diff --git a/modules/openstack_project/templates/static-http-and-https.vhost.erb b/modules/openstack_project/templates/static-http-and-https.vhost.erb index 0617f32546..189ee44afc 100644 --- a/modules/openstack_project/templates/static-http-and-https.vhost.erb +++ b/modules/openstack_project/templates/static-http-and-https.vhost.erb @@ -14,30 +14,12 @@ RewriteRule ^/(.*)$ http://<%= @vhost_name %>/$1 [L,R=301] <% end -%> 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| -%> - > - Options Indexes FollowSymLinks MultiViews - AllowOverride None - Satisfy Any - Require all granted - - <% end -%> -<% else -%> > Options Indexes FollowSymLinks MultiViews AllowOverride None Satisfy Any Require all granted -<% end -%> LogLevel warn ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined