diff options
author | Micah Anderson <micah@riseup.net> | 2010-11-28 13:03:37 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2010-11-28 13:03:37 -0500 |
commit | 1455b1f9a55cdffc582fd93fa0bc5c016585760c (patch) | |
tree | 57d98a9a9f250f038a3312edc56e4b6bcbf8571d | |
parent | 735572fac73a710321b2bc469be2cbdf17c46b11 (diff) |
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
-rw-r--r-- | manifests/linux.pp | 9 |
1 files changed, 7 insertions, 2 deletions
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], } |