summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/checklastrun.pp
blob: 76bfaec2c2cb35841f755bd981f5235e7a2008ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class puppet::puppetmaster::checklastrun {
    case $operatingsystem {
         debian,ubuntu: { $puppetlast_dest = "/usr/local/bin/puppetlast" }
         default: { $puppetlast_dest = "/opt/bin/puppetlast" }
    }




    file{"$puppetlast_dest":
        source => [ "puppet://$server/modules/site-puppet/master/puppetlast",
                    "puppet://$server/modules/puppet/master/puppetlast"],
        owner => root, group => 0, mode => 0700;
    }
    file{'/etc/cron.d/puppetlast.cron':
        content => "40 10,22 * * * root $puppetlast_dest\n",
        require => File["$puppetlast_dest"],
        owner => root, group => 0, mode => 0644,
	notify => service["cron"];
    }
}