]>
Commit | Line | Data |
---|---|---|
7fed35a4 IB |
1 | class base_installation::cronie inherits base_installation { |
2 | ensure_packages(['cronie']) | |
3 | ||
4 | unless empty($base_installation::puppet_code_path) { | |
5 | file { 'post-hook': | |
6 | ensure => file, | |
7 | path => "$base_installation::puppet_code_path/.git/hooks/post-merge", | |
8 | source => 'puppet:///modules/base_installation/cronie/puppet-post-merge', | |
9 | mode => '0755', | |
10 | owner => root, | |
11 | group => root, | |
12 | } | |
503e4cf5 | 13 | cron { 'puppet-pull-apply': |
7fed35a4 IB |
14 | ensure => present, |
15 | command => "cd $base_installation::puppet_code_path ; /usr/bin/git pull", | |
16 | user => root, | |
17 | minute => '*/30', | |
18 | require => File['post-hook'], | |
19 | } | |
503e4cf5 IB |
20 | cron { 'puppet-apply': |
21 | ensure => present, | |
2499f7e7 | 22 | command => "cd $base_installation::puppet_code_path ; puppet apply $base_installation::puppet_code_path/manifests/site.pp", |
503e4cf5 IB |
23 | user => root, |
24 | minute => '*/20' | |
25 | } | |
428fcf14 IB |
26 | cron { 'puppet-apply-reboot': |
27 | ensure => present, | |
2499f7e7 | 28 | command => "cd $base_installation::puppet_code_path ; puppet apply $base_installation::puppet_code_path/manifests/site.pp", |
428fcf14 IB |
29 | user => root, |
30 | special => "reboot" | |
31 | } | |
7fed35a4 IB |
32 | } |
33 | } |