diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-24 02:22:17 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-29 22:46:14 +0200 |
commit | 7fed35a408b9ec37454169425823785b5fc8978b (patch) | |
tree | 28371d43ac304f99fb0a5305124858db69ef2137 /modules/base_installation/manifests/cronie.pp | |
parent | ba2cf1b5d938810077b0fd73844faf432e8e8f9d (diff) | |
download | Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.gz Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.zst Puppet-7fed35a408b9ec37454169425823785b5fc8978b.zip |
Refactor base installation module
Diffstat (limited to 'modules/base_installation/manifests/cronie.pp')
-rw-r--r-- | modules/base_installation/manifests/cronie.pp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/base_installation/manifests/cronie.pp b/modules/base_installation/manifests/cronie.pp new file mode 100644 index 0000000..bcdd9a7 --- /dev/null +++ b/modules/base_installation/manifests/cronie.pp | |||
@@ -0,0 +1,21 @@ | |||
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 { 'puppet-apply': | ||
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 | } | ||
20 | } | ||
21 | } | ||