Serve docs.opendev.org from files.openstack.org

Change-Id: I2d69994b51bef96b7ba9b71b1a65d0a1956f9f73
This commit is contained in:
James E. Blair 2019-03-22 15:47:48 -07:00
parent fa0d4f949e
commit 51dda0881f
2 changed files with 11 additions and 3 deletions

View File

@ -543,8 +543,9 @@ node /^files\d*\.open.*\.org$/ {
require => Class['openstack_project::files'],
}
openstack_project::website { 'opendev.org':
aliases => ['www.opendev.org'],
openstack_project::website { 'docs.opendev.org':
aliases => [],
docroot => "/afs/openstack.org/project/opendev.org/docs",
ssl_cert => hiera('opendev_ssl_cert'),
ssl_key => hiera('opendev_ssl_key'),
ssl_intermediate => hiera('opendev_ssl_intermediate'),

View File

@ -19,6 +19,7 @@ define openstack_project::website (
$ssl_key = undef,
$ssl_intermediate = undef,
$template = 'openstack_project/website.vhost.erb',
$docroot = undef,
) {
$afs_root = '/afs/openstack.org/'
@ -29,10 +30,16 @@ define openstack_project::website (
$volume_name_ = $volume_name
}
if $docroot == undef {
$docroot_ = "${afs_root}/project/${volume_name_}/www"
} else {
$docroot_ = $docroot
}
::httpd::vhost { $name:
serveraliases => $aliases,
port => 443, # Is required despite not being used.
docroot => "${afs_root}/project/${volume_name_}/www",
docroot => $docroot_,
priority => '50',
template => $template,
require => [File["/etc/ssl/certs/${name}.pem"],