Skip to content
Browse files

do not use other class param values as default

This commit removes examples where class params
used the values of other params as their default.
I recently learned that this does not work!
  • Loading branch information...
1 parent 5463abb commit 5b293a1970e01bf7191732e0b8c42b15d4639d0d @bodepd committed
Showing with 24 additions and 6 deletions.
  1. +9 −2 manifests/compute.pp
  2. +15 −4 manifests/controller.pp
View
11 manifests/compute.pp
@@ -44,7 +44,7 @@
# VNC
$vnc_enabled = true,
$vncproxy_host = undef,
- $vncserver_listen = $internal_address,
+ $vncserver_listen = false,
# cinder / volumes
$cinder = true,
$cinder_sql_connection = undef,
@@ -57,6 +57,13 @@
$enabled = true
) {
+ if $vncserver_listen {
+ $vncserver_listen_real = $vncserver_listen
+ } else {
+ $vncserver_listen_real = $internal_address
+ }
+
+
#
# indicates that all nova config entries that we did
# not specifify in Puppet should be purged from file
@@ -90,7 +97,7 @@
# Configure libvirt for nova-compute
class { 'nova::compute::libvirt':
libvirt_type => $libvirt_type,
- vncserver_listen => $vncserver_listen,
+ vncserver_listen => $vncserver_listen_real,
migration_support => $migration_support,
}
View
19 manifests/controller.pp
@@ -104,8 +104,8 @@
$nova_db_dbname = 'nova',
$purge_nova_config = true,
# Network
- $internal_address = $public_address,
- $admin_address = $public_address,
+ $internal_address = false,
+ $admin_address = false,
$network_manager = 'nova.network.manager.FlatDHCPManager',
$fixed_range = '10.0.0.0/24',
$floating_range = false,
@@ -136,6 +136,17 @@
$enabled = true
) {
+ if $internal_address {
+ $internal_address_real = $internal_address
+ } else {
+ $internal_address_real = $public_address
+ }
+ if $admin_address {
+ $admin_address_real = $admin_address
+ } else {
+ $admin_address_real = $public_address
+ }
+
# Ensure things are run in order
Class['openstack::db::mysql'] -> Class['openstack::keystone']
Class['openstack::db::mysql'] -> Class['openstack::glance']
@@ -186,7 +197,7 @@
admin_email => $admin_email,
admin_password => $admin_password,
public_address => $public_address,
- internal_address => $internal_address,
+ internal_address => $internal_address_real,
admin_address => $admin_address,
region => $region,
glance_user_password => $glance_user_password,
@@ -232,7 +243,7 @@
fixed_range => $fixed_range,
public_address => $public_address,
admin_address => $admin_address,
- internal_address => $internal_address,
+ internal_address => $internal_address_real,
auto_assign_floating_ip => $auto_assign_floating_ip,
create_networks => $create_networks,
num_networks => $num_networks,

0 comments on commit 5b293a1

Please sign in to comment.
Something went wrong with that request. Please try again.