summaryrefslogtreecommitdiffstats
path: root/modules/munin/manifests/node.pp
blob: b58d7c288b055637db17b70d6a59f1d21da8062d (plain) (blame)
1
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
class munin::node {
  package { 'munin-node':
  }

  service { 'munin-node':
    ensure => running,
    enable => true,
    require => [
      Package['munin-node'],
      Exec['/usr/bin/systemctl daemon-reload'],
    ],
    subscribe => [
      File['/etc/munin/munin-node.conf'],
      File['/etc/systemd/system/munin-node.service.d/override.conf'],
    ];
  }

  file {
    '/etc/munin/munin-node.conf':
      content => template('munin/munin-node.conf'),
      require => Package['munin-node'];
    '/etc/systemd/system/munin-node.service.d':
      ensure => directory;
    '/etc/systemd/system/munin-node.service.d/override.conf':
      source => 'puppet:///modules/munin/override.conf',
      notify => Exec["/usr/bin/systemctl daemon-reload"],
      require => File["/etc/systemd/system/munin-node.service.d"];
  }
}