puppet-ironic/manifests/inventory.pp
Takashi Kajinami f64f7a0db5 replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

This also adds validations about the following parameters to enforce
the implicit requirements.
 - ironic::inspector::pxe_transfer_protocol
 - ironic::pxe::tftp_use_xinetd

Change-Id: I6a69e90f81c98abbba32a423bdda2b58e0e826af
2023-06-21 13:40:44 +09:00

36 lines
887 B
Puppet

# == Class: ironic::inventory
#
# Configure the inventory parameters
#
# === Parameters
#
# [*data_backend*]
# (Optional) The storage backend for storing introspection data.
# Defaults to $facts['os_service_default'].
#
# [*swift_data_container*]
# (Optional) The Swift introspection data container to store the inventory
# data.
# Defaults to $facts['os_service_default'].
#
class ironic::inventory (
$data_backend = $facts['os_service_default'],
$swift_data_container = $facts['os_service_default'],
) {
include ironic::deps
include ironic::params
if ! is_service_default($data_backend) {
if ! member(['none', 'database', 'swift'], $data_backend) {
fail('Unsupported data backend')
}
}
ironic_config {
'inventory/data_backend': value => $data_backend;
'inventory/swift_data_container': value => $swift_data_container;
}
}