Support [DEFAULT] host option
... which is internally used as an opaque identifier. Change-Id: I3591fbe25c4edc772825492be034361cdc492641
This commit is contained in:
parent
683e85ac75
commit
a074f85a0d
@ -29,6 +29,10 @@
|
|||||||
# (optional) The state of the package
|
# (optional) The state of the package
|
||||||
# Defaults to 'present'
|
# Defaults to 'present'
|
||||||
#
|
#
|
||||||
|
# [*host*]
|
||||||
|
# (optional) Name of this node.
|
||||||
|
# Defaults to $facts['os_service_default'].
|
||||||
|
#
|
||||||
# [*my_ip*]
|
# [*my_ip*]
|
||||||
# (optional) IP address of this host.
|
# (optional) IP address of this host.
|
||||||
# If unset, will determine the IP programmatically. If unable to do so, will use
|
# If unset, will determine the IP programmatically. If unable to do so, will use
|
||||||
@ -215,6 +219,7 @@
|
|||||||
class ironic (
|
class ironic (
|
||||||
Boolean $enabled = true,
|
Boolean $enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
|
$host = $facts['os_service_default'],
|
||||||
$my_ip = $facts['os_service_default'],
|
$my_ip = $facts['os_service_default'],
|
||||||
$my_ipv6 = $facts['os_service_default'],
|
$my_ipv6 = $facts['os_service_default'],
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
@ -279,6 +284,7 @@ class ironic (
|
|||||||
|
|
||||||
ironic_config {
|
ironic_config {
|
||||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||||
|
'DEFAULT/host': value => $host;
|
||||||
'DEFAULT/my_ip': value => $my_ip;
|
'DEFAULT/my_ip': value => $my_ip;
|
||||||
'DEFAULT/my_ipv6': value => $my_ipv6;
|
'DEFAULT/my_ipv6': value => $my_ipv6;
|
||||||
'DEFAULT/default_resource_class': value => $default_resource_class;
|
'DEFAULT/default_resource_class': value => $default_resource_class;
|
||||||
|
4
releasenotes/notes/host-opt-df3665183e207085.yaml
Normal file
4
releasenotes/notes/host-opt-df3665183e207085.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``ironic::host`` parameter has been added.
|
@ -63,6 +63,7 @@ describe 'ironic' do
|
|||||||
|
|
||||||
it 'configures ironic.conf' 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/auth_strategy').with_value('keystone')
|
||||||
|
is_expected.to contain_ironic_config('DEFAULT/host').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/my_ipv6').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('DEFAULT/my_ipv6').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/default_resource_class').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('DEFAULT/default_resource_class').with_value('<SERVICE DEFAULT>')
|
||||||
@ -108,6 +109,7 @@ describe 'ironic' do
|
|||||||
context 'with parameters' do
|
context 'with parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
|
:host => 'host.example.com',
|
||||||
:my_ip => '127.0.0.1',
|
:my_ip => '127.0.0.1',
|
||||||
:my_ipv6 => '::1',
|
:my_ipv6 => '::1',
|
||||||
:default_resource_class => 'myclass',
|
:default_resource_class => 'myclass',
|
||||||
@ -144,6 +146,7 @@ describe 'ironic' do
|
|||||||
|
|
||||||
it 'configures ironic.conf' 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/auth_strategy').with_value('keystone')
|
||||||
|
is_expected.to contain_ironic_config('DEFAULT/host').with_value('host.example.com')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('127.0.0.1')
|
is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('127.0.0.1')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/my_ipv6').with_value('::1')
|
is_expected.to contain_ironic_config('DEFAULT/my_ipv6').with_value('::1')
|
||||||
is_expected.to contain_ironic_config('DEFAULT/default_resource_class').with_value('myclass')
|
is_expected.to contain_ironic_config('DEFAULT/default_resource_class').with_value('myclass')
|
||||||
|
Loading…
Reference in New Issue
Block a user