Puppet Class: grafana::loki
- Defined in:
- modules/grafana/manifests/loki.pp
Overview
SPDX-License-Identifier: Apache-2.0 Grafana Loki is a set of components that can be composed into a fully featured logging stack. Params:
$config: Hash of configuration options written to /etc/loki/loki-local-config.yaml
$ensure: 'present' (installed) or 'absent' (uninstalled)
$version: (optional) the package version to ensure
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'modules/grafana/manifests/loki.pp', line 7
class grafana::loki (
Hash $config = {},
Wmflib::Ensure $ensure = 'present',
Optional[String] $version = undef
) {
$_package_ensure = $ensure ? {
'absent' => 'absent',
default => pick($version, $ensure)
}
package { 'grafana-loki':
ensure => $_package_ensure
}
if ($config) {
file { '/etc/loki/loki-local-config.yaml':
mode => '0644',
content => to_yaml($config),
require => Package['grafana-loki']
}
}
}
|