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

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

  file {
    '/etc/cron.daily/updatedb':
      source => 'puppet:///modules/locate/updatedb',
      mode => '0755',
      require => [
        Package['mlocate'],
        Class['cron'],
      ];
  }

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