From 51dda0881fbeaa215c3a724db8831d8d71a18c92 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 22 Mar 2019 15:47:48 -0700 Subject: [PATCH] Serve docs.opendev.org from files.openstack.org Change-Id: I2d69994b51bef96b7ba9b71b1a65d0a1956f9f73 --- manifests/site.pp | 5 +++-- modules/openstack_project/manifests/website.pp | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 22b1e4ec43..28fabf6c0a 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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'), diff --git a/modules/openstack_project/manifests/website.pp b/modules/openstack_project/manifests/website.pp index f123f5e88f..ac77b35e05 100644 --- a/modules/openstack_project/manifests/website.pp +++ b/modules/openstack_project/manifests/website.pp @@ -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"],