Puppet Class: puppet_metrics_dashboard::repos
- Defined in:
- manifests/repos.pp
Summary
Configures InfluxDB and Grafana reposOverview
Configures InfluxDB and Grafana repos
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'manifests/repos.pp', line 6
class puppet_metrics_dashboard::repos {
if $puppet_metrics_dashboard::manage_repos {
case $facts['os']['family'] {
'RedHat': {
yumrepo {'influxdb':
ensure => present,
descr => 'influxdb-repository',
enabled => 1,
gpgcheck => 1,
baseurl => 'https://repos.influxdata.com/rhel/$releasever/$basearch/stable',
gpgkey => 'https://repos.influxdata.com/influxdb.key',
}
yumrepo { 'grafana-repo':
ensure => 'present',
baseurl => 'https://packages.grafana.com/oss/rpm',
descr => 'grafana-repository',
enabled => '1',
repo_gpgcheck => '1',
gpgcheck => '1',
gpgkey => 'https://packages.grafana.com/gpg.key',
sslverify => '1',
sslcacert => '/etc/pki/tls/certs/ca-bundle.crt',
}
}
'Debian': {
$_operatingsystem = downcase($facts['os']['name'])
$_oscodename = downcase($facts['os']['distro']['codename'])
apt::source { 'influxdb':
location => "https://repos.influxdata.com/${_operatingsystem}",
release => $_oscodename,
repos => 'stable',
key => {
'id' => '05CE15085FC09D18E99EFB22684A14CF2582E0C5',
'source' => 'https://repos.influxdata.com/influxdb.key',
},
}
apt::source { 'grafana':
location => 'https://packages.grafana.com/oss/deb',
release => 'stable',
repos => 'main',
key => {
'id' => '4E40DDF6D76E284A4A6780E48C8C34C524098CB6',
'source' => 'https://packages.grafana.com/gpg.key',
},
}
}
default: {
fail("${facts['os']['family']} installation not supported")
}
}
}
}
|