summaryrefslogtreecommitdiffstats
path: root/modules/tick/manifests/server/kapacitor.pp
blob: c1dfcd74e91a3bddc7410de9e54ad3dd5112211d (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
class tick::server::kapacitor {
  package::makepkg { 'kapacitor-bin':
    ensure => installed;
  }

  $smtp_password = secret::value('kapacitor_smtp_password')

  file {
    "/etc/kapacitor/kapacitor.conf":
      content => template('tick/kapacitor.conf'),
      require => Package::Makepkg['kapacitor-bin'],
      notify => Service['kapacitor'];
    "/media/persistent/kapacitor":
      ensure => directory,
      owner => "kapacitor",
      group => "kapacitor",
      require => Package::Makepkg['kapacitor-bin'];
  }

  service { 'kapacitor':
    ensure => running,
    enable => true,
    require => Package::Makepkg['kapacitor-bin'];
  }
}