summaryrefslogtreecommitdiffstats
path: root/modules/locate/manifests/init.pp
blob: af5b5a7068979cc903a9e239972a08b188161c0e (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
class locate {
  include godwrap

  package { "mlocate":
    ensure => installed,
  }

  cron::job { "updatedb":
    frequency => "daily",
    source => 'puppet:///modules/locate/updatedb',
    require => Package['mlocate'];
  }

  exec { "initial updatedb run":
    command => "/etc/cron.daily/updatedb",
    creates => "/var/lib/mlocate/mlocate.db",
    require => [
      File["/etc/cron.daily/updatedb"],
      Package['mlocate'],
      Class['godwrap'],
    ]
  }
}