51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'manifests/init.pp', line 51
class otelcol (
String $package_name = 'otelcol',
Enum['present','absent','installed','latest'] $package_ensure = 'installed',
String $service_name = $package_name,
String $environment_file = "/etc/${package_name}/${package_name}.conf",
Optional[String] $run_options = undef,
String $config_file = "/etc/${package_name}/config.yaml",
String $config_file_owner = 'root',
String $config_file_group = 'root',
Stdlib::Filemode $config_file_mode = '0644',
Hash[String, Hash] $receivers = {},
Hash[String, Hash] $processors = {},
Hash[String, Hash] $exporters = {},
Hash[String, Hash] $pipelines = {},
Hash[String, Hash] $extensions = {},
Variant[Hash,String[1]] $log_options = {},
Enum['none','basic','normal','detailed'] $metrics_level = 'basic',
Optional[Stdlib::Host] $metrics_address_host = undef,
Stdlib::Port $metrics_address_port = 8888,
Stdlib::Ensure::Service $service_ensure = 'running',
Boolean $manage_service = true,
Boolean $manage_archive = false,
String[1] $localpath_archive = '/tmp',
# Boolean $manage_user = false,
String[1] $archive_version = '0.89.0',
String[1] $archive_location = "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${archive_version}/${package_name}_${archive_version}_linux_amd64",
) {
contain otelcol::install
contain otelcol::config
if($manage_service) {
contain otelcol::service
Class['otelcol::config'] ~> Class['otelcol::service']
Class['otelcol::install'] ~> Class['otelcol::service']
}
Class['otelcol::install'] -> Class['otelcol::config']
}
|