]>
Commit | Line | Data |
---|---|---|
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 | } | |
13 | cron::job { 'puppet-pull-apply': | |
14 | ensure => present, | |
15 | command => "cd $base_installation::puppet_code_path ; /usr/bin/git pull", | |
16 | user => root, | |
17 | minute => '15,45', | |
18 | require => File['post-hook'], | |
19 | description => "Pull git and apply puppet changes", | |
20 | } | |
21 | cron::job::multiple { 'puppet-apply': | |
22 | ensure => present, | |
23 | jobs => [ | |
24 | { | |
25 | command => "cd $base_installation::puppet_code_path ; /usr/local/sbin/puppet_apply $base_installation::puppet_code_path/manifests/site.pp", | |
26 | user => root, | |
27 | minute => '*/20', | |
28 | description => "Re-apply puppet changes regularly", | |
29 | }, | |
30 | { | |
31 | command => "cd $base_installation::puppet_code_path ; /usr/local/sbin/puppet_apply $base_installation::puppet_code_path/manifests/site.pp", | |
32 | user => root, | |
33 | special => "reboot", | |
34 | description => "Re-apply puppet changes at reboot", | |
35 | } | |
36 | ] | |
37 | } | |
38 | ||
39 | cron::daily { 'pacman_keys': | |
40 | ensure => present, | |
41 | command => "pacman-key --populate archlinux", | |
42 | user => root, | |
43 | minute => "0", | |
44 | hour => "1", | |
45 | description => "Populate pacman keys", | |
46 | } | |
47 | } | |
48 | } |