diff --git a/packstack/puppet/templates/nova_common_qpid.pp b/packstack/puppet/templates/nova_common_qpid.pp index 2b9e54ae6..95de40e38 100644 --- a/packstack/puppet/templates/nova_common_qpid.pp +++ b/packstack/puppet/templates/nova_common_qpid.pp @@ -1,4 +1,3 @@ - $private_key = { type => hiera('NOVA_MIGRATION_KEY_TYPE'), key => hiera('NOVA_MIGRATION_KEY_SECRET'), @@ -9,14 +8,6 @@ $public_key = { } $nova_common_qpid_cfg_storage_host = hiera('CONFIG_STORAGE_HOST') -$config_horizon_ssl = hiera('CONFIG_HORIZON_SSL') - -$vncproxy_protocol = $config_horizon_ssl ? { - true => 'https', - false => 'http', - default => 'http', -} - class { 'nova': glance_api_servers => "${nova_common_qpid_cfg_storage_host}:9292", @@ -30,6 +21,4 @@ class { 'nova': debug => hiera('CONFIG_DEBUG_MODE'), nova_public_key => $public_key, nova_private_key => $private_key, - vncproxy_host => hiera('CONFIG_CONTROLLER_HOST'), - vncproxy_protocol => $vncproxy_protocol, } diff --git a/packstack/puppet/templates/nova_common_rabbitmq.pp b/packstack/puppet/templates/nova_common_rabbitmq.pp index b450f7bcb..f2c0394ab 100644 --- a/packstack/puppet/templates/nova_common_rabbitmq.pp +++ b/packstack/puppet/templates/nova_common_rabbitmq.pp @@ -1,4 +1,3 @@ - $private_key = { type => hiera('NOVA_MIGRATION_KEY_TYPE'), key => hiera('NOVA_MIGRATION_KEY_SECRET'), @@ -9,13 +8,6 @@ $public_key = { } $nova_common_rabbitmq_cfg_storage_host = hiera('CONFIG_STORAGE_HOST') -$config_horizon_ssl = hiera('CONFIG_HORIZON_SSL') - -$vncproxy_protocol = $config_horizon_ssl ? { - true => 'https', - false => 'http', - default => 'http', -} class { 'nova': glance_api_servers => "${nova_common_rabbitmq_cfg_storage_host}:9292", @@ -28,6 +20,4 @@ class { 'nova': debug => hiera('CONFIG_DEBUG_MODE'), nova_public_key => $public_key, nova_private_key => $private_key, - vncproxy_host => hiera('CONFIG_CONTROLLER_HOST'), - vncproxy_protocol => $vncproxy_protocol, } diff --git a/packstack/puppet/templates/nova_compute.pp b/packstack/puppet/templates/nova_compute.pp index 9c07c4875..33c4d7908 100644 --- a/packstack/puppet/templates/nova_compute.pp +++ b/packstack/puppet/templates/nova_compute.pp @@ -27,6 +27,18 @@ nova_config{ value => hiera('CONFIG_NOVA_COMPUTE_MIGRATE_URL'); } +if $is_horizon_ssl == undef { + $is_horizon_ssl = hiera('CONFIG_HORIZON_SSL') +} + +if $vncproxy_protocol == undef { + $vncproxy_protocol = $is_horizon_ssl ? { + true => 'https', + false => 'http', + default => 'http', + } +} + if ($::fqdn == '' or $::fqdn =~ /localhost/) { # For cases where FQDNs have not been correctly set $vncproxy_server = choose_my_ip(hiera('HOST_LIST')) @@ -36,6 +48,8 @@ if ($::fqdn == '' or $::fqdn =~ /localhost/) { class { 'nova::compute': enabled => true, + vncproxy_host => hiera('CONFIG_CONTROLLER_HOST'), + vncproxy_protocol => $vncproxy_protocol, vncserver_proxyclient_address => $vncproxy_server, compute_manager => hiera('CONFIG_NOVA_COMPUTE_MANAGER'), } diff --git a/packstack/puppet/templates/nova_vncproxy.pp b/packstack/puppet/templates/nova_vncproxy.pp index 2463de0f0..5e8e13dc5 100644 --- a/packstack/puppet/templates/nova_vncproxy.pp +++ b/packstack/puppet/templates/nova_vncproxy.pp @@ -1,6 +1,8 @@ -$is_using_ssl_on_horizon = hiera('CONFIG_HORIZON_SSL') +if $is_horizon_ssl == undef { + $is_horizon_ssl = hiera('CONFIG_HORIZON_SSL') +} -if $is_using_ssl_on_horizon == true { +if $is_horizon_ssl == true { nova_config { 'DEFAULT/ssl_only': value => true; 'DEFAULT/cert': value => '/etc/nova/nova.crt'; @@ -8,8 +10,18 @@ if $is_using_ssl_on_horizon == true { } } +if $vncproxy_protocol == undef { + $vncproxy_protocol = $is_horizon_ssl ? { + true => 'https', + false => 'http', + default => 'http', + } +} + class { 'nova::vncproxy': - enabled => true, + enabled => true, + host => hiera('CONFIG_CONTROLLER_HOST'), + vncproxy_protocol => $vncproxy_protocol, } class { 'nova::consoleauth':