puppet-placement/manifests/init.pp
Benedikt Trefzer f6ba76c00b replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: If29a88bdb31e26a6e95cca854385ae0960a5e05f
2023-06-06 08:09:15 +02:00

62 lines
1.8 KiB
Puppet

# == Class: placement
#
# Full description of class placement here.
#
# === Parameters
#
# [*ensure_package*]
# (Optional) The state of nova packages
# Defaults to 'present'
#
# [*sync_db*]
# (Optional) Run db sync on the node.
# Defaults to true
#
# [*state_path*]
# (optional) Directory for storing state.
# Defaults to $facts['os_service_default']
#
# [*randomize_allocation_candidates*]
# (Optional) Randomize the results of the returned
# allocation candidates.
# Defaults to $facts['os_service_default']
#
# [*allocation_conflict_retry_count*]
# (Optional) The number of retries when confliction is detected in concurrent
# allocations.
# Defaults to $facts['os_service_default']
#
class placement(
$ensure_package = 'present',
Boolean $sync_db = true,
$state_path = $facts['os_service_default'],
$randomize_allocation_candidates = $facts['os_service_default'],
$allocation_conflict_retry_count = $facts['os_service_default'],
) inherits placement::params {
include placement::deps
if $sync_db {
include placement::db::sync
}
package { 'python-placement':
ensure => $ensure_package,
name => $::placement::params::python_package_name,
tag => ['openstack', 'placement-package'],
}
package { 'placement-common':
ensure => $ensure_package,
name => $::placement::params::common_package_name,
require => Package['python-placement'],
tag => ['openstack', 'placement-package'],
}
placement_config {
'DEFAULT/state_path' : value => $state_path;
'placement/randomize_allocation_candidates': value => $randomize_allocation_candidates;
'placement/allocation_conflict_retry_count': value => $allocation_conflict_retry_count;
}
}