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
|
# File 'modules/pyrra/manifests/filesystem.pp', line 11
class pyrra::filesystem(
String $prometheus_url = 'http://localhost:17902/rule/', # issue reloads to local thanos rule T364645
String $config_files = '/etc/pyrra/config/*.yaml',
String $prometheus_folder = '/etc/pyrra/output-rules/',
){
ensure_packages(['pyrra'])
$config_folder = dirname($config_files)
file { [ $prometheus_folder, $config_folder ]:
ensure => directory,
mode => '0755',
owner => 'pyrra',
group => 'pyrra',
require => Package['pyrra'],
}
systemd::service { 'pyrra-filesystem':
ensure => present,
restart => true,
override => true,
content => systemd_template('pyrra-filesystem'),
service_params => {
enable => true,
hasrestart => true,
},
}
systemd::unit { 'pyrra-filesystem-notify-thanos.path':
ensure => absent,
restart => true,
content => systemd_template('pyrra-filesystem-notify-thanos'),
}
}
|