1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'modules/prometheus/manifests/elasticsearch_exporter/common.pp', line 1
class prometheus::elasticsearch_exporter::common {
ensure_packages('prometheus-elasticsearch-exporter')
# We will install per-cluster systemd units instead
service { 'prometheus-elasticsearch-exporter':
ensure => 'stopped',
require => Package['prometheus-elasticsearch-exporter'],
}
# Remove so there is no confusion about if it's referenced
file { '/etc/default/prometheus-elasticsearch-exporter':
ensure => absent,
}
# mask the default service to make sure its not restarted on package upgrades
# TODO: clean this up and use the mask param for service
exec { 'mask_default_prometheus_elasticsearch_exporter':
command => '/bin/systemctl mask prometheus-elasticsearch-exporter.service',
creates => '/etc/systemd/system/prometheus-elasticsearch-exporter.service',
}
}
|