Hostname and CORS domains are now configurable.

Moved $hostname and $cors_allowed_origins into the top
level module, so that they may be set on a per-host basis.

Change-Id: I9859c903d0075493d230e433d68e0471f019140a
This commit is contained in:
Michael Krotscheck 2015-02-23 13:08:51 -08:00
parent 1bd2b2bca9
commit 5dd484f1b2
2 changed files with 10 additions and 6 deletions

View File

@ -421,10 +421,15 @@ node 'storyboard.openstack.org' {
ssl_cert_file_contents => hiera('storyboard_ssl_cert_file_contents', 'XXX'), ssl_cert_file_contents => hiera('storyboard_ssl_cert_file_contents', 'XXX'),
ssl_key_file_contents => hiera('storyboard_ssl_key_file_contents', 'XXX'), ssl_key_file_contents => hiera('storyboard_ssl_key_file_contents', 'XXX'),
ssl_chain_file_contents => hiera('storyboard_ssl_chain_file_contents', 'XXX'), ssl_chain_file_contents => hiera('storyboard_ssl_chain_file_contents', 'XXX'),
hostname => $::fqdn,
valid_oauth_clients => [ valid_oauth_clients => [
$::fqdn, $::fqdn,
'docs-draft.openstack.org', 'docs-draft.openstack.org',
], ],
cors_allowed_origins => [
"https://${::fqdn}",
'http://docs-draft.openstack.org',
],
} }
} }

View File

@ -12,7 +12,9 @@ class openstack_project::storyboard(
$ssl_chain_file_contents = undef, $ssl_chain_file_contents = undef,
$openid_url = 'https://login.launchpad.net/+openid', $openid_url = 'https://login.launchpad.net/+openid',
$project_config_repo = '', $project_config_repo = '',
$valid_oauth_clients = [], $hostname = $::fqdn,
$valid_oauth_clients = [$::fqdn],
$cors_allowed_origins = ["https://${::fqdn}"],
) { ) {
class { 'project_config': class { 'project_config':
@ -40,11 +42,8 @@ class openstack_project::storyboard(
} }
class { '::storyboard::application': class { '::storyboard::application':
hostname => $::fqdn, hostname => $hostname,
cors_allowed_origins => [ cors_allowed_origins => $cors_allowed_origins,
'https://storyboard.openstack.org',
'http://docs-draft.openstack.org',
],
valid_oauth_clients => $valid_oauth_clients, valid_oauth_clients => $valid_oauth_clients,
cors_max_age => 3600, cors_max_age => 3600,
openid_url => $openid_url, openid_url => $openid_url,