]>
Commit | Line | Data |
---|---|---|
ba2cf1b5 IB |
1 | class cron_puppet ( |
2 | $code_path = "/etc/puppetlabs/code" | |
3 | ) { | |
596f9fef IB |
4 | file { 'post-hook': |
5 | ensure => file, | |
ba2cf1b5 | 6 | path => "$code_path/.git/hooks/post-merge", |
5b4fbb5f IB |
7 | source => 'puppet:///modules/cron_puppet/post-merge', |
8 | mode => '0755', | |
596f9fef IB |
9 | owner => root, |
10 | group => root, | |
11 | } | |
49688e5c | 12 | package { 'cronie': |
3b0f154d | 13 | ensure => 'present', |
49688e5c | 14 | } |
596f9fef IB |
15 | cron { 'puppet-apply': |
16 | ensure => present, | |
ba2cf1b5 | 17 | command => "cd $code_path ; /usr/bin/git pull", |
596f9fef IB |
18 | user => root, |
19 | minute => '*/30', | |
20 | require => File['post-hook'], | |
21 | } | |
49688e5c IB |
22 | service { 'cronie': |
23 | ensure => 'running', | |
24 | enable => true | |
25 | } | |
596f9fef | 26 | } |