From 05d474c3b219af82dcdfab7bb6bd2a6c0e6cdbcc Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 11 May 2016 17:34:46 -0400 Subject: [PATCH] allow to configure my_ip parameter my_ip is useful to compute some parameter, for glance & neutron urls. Change-Id: Ia283451647630b23bda19d3a14a17339ce258e17 --- manifests/init.pp | 8 ++++++++ spec/classes/ironic_init_spec.rb | 1 + 2 files changed, 9 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 10754284..57c198a8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -37,6 +37,12 @@ # (optional) Print debug messages in the logs # Defaults to False # +# [*my_ip*] +# (optional) IP address of this host. +# If unset, will determine the IP programmatically. If unable to do so, will use +# "127.0.0.1". +# Defaults to $::os_service_default. +# # [*auth_strategy*] # (optional) Default protocol to use when connecting to glance # Defaults to 'keystone'. 'https' is the only other valid option for SSL @@ -215,6 +221,7 @@ class ironic ( $package_ensure = 'present', $verbose = undef, $debug = undef, + $my_ip = $::os_service_default, $use_syslog = undef, $use_stderr = undef, $log_facility = undef, @@ -311,6 +318,7 @@ class ironic ( ironic_config { 'DEFAULT/auth_strategy': value => $auth_strategy; 'DEFAULT/enabled_drivers': value => join($enabled_drivers, ','); + 'DEFAULT/my_ip': value => $my_ip; 'glance/glance_num_retries': value => $glance_num_retries; 'glance/glance_api_insecure': value => $glance_api_insecure; } diff --git a/spec/classes/ironic_init_spec.rb b/spec/classes/ironic_init_spec.rb index e5b21afd..3eb6f81c 100644 --- a/spec/classes/ironic_init_spec.rb +++ b/spec/classes/ironic_init_spec.rb @@ -120,6 +120,7 @@ describe 'ironic' do it 'configures ironic.conf' do is_expected.to contain_ironic_config('DEFAULT/auth_strategy').with_value('keystone') + is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('') is_expected.to contain_ironic_config('DEFAULT/rpc_response_timeout').with_value('') is_expected.to contain_ironic_config('DEFAULT/control_exchange').with_value('') end