Puppet Class: grafana_alloy::repo

Defined in:
manifests/repo.pp

Summary

Configure Grafana repo

Overview



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/repo.pp', line 2

class grafana_alloy::repo (
) {
  case $facts['os']['family'] {
    'RedHat': {
      yumrepo { 'grafana-alloy':
        descr    => 'Grafana Alloy',
        baseurl  => 'https://rpm.grafana.com',
        gpgcheck => '1',
        gpgkey   => 'https://rpm.grafana.com/gpg.key',
        enabled  => '1',
      }
    }
    'Debian': {
      include apt

      apt::source { 'grafana-alloy':
        release  => 'stable',
        repos    => 'main',
        location => 'https://apt.grafana.com',
        include  => {
          src => false,
        },
        key      => {
          name     => 'grafana-alloy',
          filename => 'grafana-alloy.asc',
          source   => 'https://apt.grafana.com/gpg.key',
        },
      }
    }
    default: {
      fail("${facts['networking']['hostname']}: This module does not support osfamily ${facts['os']['family']}")
    }
  }
}