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
|
# File 'manifests/client/wireguard.pp', line 3
class prometheus::client::wireguard {
include prometheus
package { 'prometheus-wireguard-exporter': }
-> file { '/etc/sudoers.d/prometheus-wireguard-exporter':
ensure => file,
owner => 'root',
group => 'root',
mode => '0600',
content => 'wireguard_exporter ALL = NOPASSWD: /usr/bin/wg',
}
-> service { 'prometheus-wireguard-exporter':
ensure => running,
enable => true,
}
Configvault_Write { 'prometheus/wireguard':
source => '/etc/identifier',
public => true,
}
firewall { '100 allow prometheus wireguard metrics':
source => $prometheus::server_ip,
dport => 9586,
proto => 'tcp',
action => 'accept',
}
}
|