From 1455b1f9a55cdffc582fd93fa0bc5c016585760c Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Sun, 28 Nov 2010 13:03:37 -0500 Subject: I've removed the pre-requirement that you need to have the 'bc' module installed. It seems a little silly to have a hard-coded dependency on a module that simply installs one package. I replaced it with a test to see if the package has been defined elsewhere, and if not then it installs it, allowing those who wish to continue to do this to have no change. I also provide a mechanism to specify the version, if desired. Conflicts: manifests/linux.pp --- manifests/linux.pp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/linux.pp b/manifests/linux.pp index b7a8142..f1f89b4 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -10,8 +10,13 @@ class puppet::linux inherits puppet::base { ensure => $facter_ensure_version, } - # package bc needed for cron job - include bc + if !defined(Package["bc"]) { + if $bc_ensure_version == '' { $bc_ensure_version = 'installed' } + package { 'bc': + ensure => $bc_ensure_version, + } + } + Service['puppet']{ require => Package[puppet], } -- cgit v1.2.3