42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'manifests/server/config.pp', line 42
class minio::server::config (
Hash[String[1], Variant[String, Integer]] $configuration = $minio::server::configuration,
String $owner = $minio::server::owner,
String $group = $minio::server::group,
Stdlib::Absolutepath $configuration_directory = $minio::server::configuration_directory,
Stdlib::Absolutepath $installation_directory = $minio::server::installation_directory,
Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]] $storage_root = $minio::server::storage_root,
Optional[Stdlib::Absolutepath] $custom_configuration_file_path = $minio::server::custom_configuration_file_path,
) {
$storage = [$storage_root].flatten()
if ($storage.length() > 1 and !has_key($configuration, 'MINIO_DEPLOYMENT_DEFINITION')) {
fail('Please provide a value for the MINIO_DEPLOYMENT_DEFINITION in configuration to run distributed or erasure-coded deployment.')
}
$configuration_file_path = pick($custom_configuration_file_path, "${configuration_directory}/config")
$default_configuration = {
'MINIO_ROOT_USER' => 'admin',
'MINIO_ROOT_PASSWORD' => 'password',
'MINIO_REGION_NAME' => 'us-east-1',
'MINIO_DEPLOYMENT_DEFINITION' => $storage[0],
}
$resulting_configuration = deep_merge($default_configuration, $configuration)
file { $configuration_file_path:
content => template('minio/config.erb'),
owner => $owner,
group => $group,
mode => '0644',
}
}
|