From b6b60f3c73d35a0d175fb6a6b7d62a73a480f6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Charlier?= Date: Mon, 24 Feb 2014 11:40:50 +0100 Subject: [PATCH] base: ensure cron is running & enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To allow for example logrotate to run every night … Fixes bug#292 --- manifests/init.pp | 5 +++++ spec/classes/cloud_init_spec.rb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 06316ae3..3d45c866 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -65,4 +65,9 @@ This node is under the control of Puppet ${::puppetversion}. uid => '0', } + service { 'cron': + ensure => running, + enable => true + } + } diff --git a/spec/classes/cloud_init_spec.rb b/spec/classes/cloud_init_spec.rb index 881764a7..83ab4b18 100644 --- a/spec/classes/cloud_init_spec.rb +++ b/spec/classes/cloud_init_spec.rb @@ -56,6 +56,11 @@ describe 'cloud' do ) end + it { shoud contain_service('cron').with({ + :ensure => 'running', + :enable => true + }) } + end context 'on Debian platforms' do