From: Daniele Sluijters Date: Thu, 23 Apr 2015 20:54:17 +0000 (+0200) Subject: Give clearer instructions around lsb-release X-Git-Tag: 2.1.0~14^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1318344500cff03cf0c715fd94664d70a7e74358;hp=55a17ac5916110ad996e85af05a18fbdf21a90d5;p=puppet-modules%2Fpuppetlabs-apt.git Give clearer instructions around lsb-release --- diff --git a/README.md b/README.md index e8e6d39..79a0dec 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ The apt module lets you use Puppet to manage Apt sources, keys, and other config Apt (Advanced Package Tool) is a package manager available on Debian, Ubuntu, and several other operating systems. The apt module provides a series of classes, defines, types, and facts to help you automate Apt package management. +**Note**: For this module to be able to correctly auto detect which version of Debian/Ubuntu or derivative you're running you need to make sure the 'lsb-release' package is installed. We highly recommend making this part of your provisioning layer if you run many Debian or derivative systems or ensuring that you have at least Facter 2.2.0 installed which will pull in this dependency for you. + ## Setup ### What apt affects diff --git a/manifests/params.pp b/manifests/params.pp index 32e4dba..0b1afe7 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -150,7 +150,7 @@ class apt::params { } } undef: { - fail('Unable to determine lsbdistid, is lsb-release installed?') + fail('Unable to determine lsbdistid, please install lsb-release first') } default: { $ppa_options = undef diff --git a/spec/classes/params_spec.rb b/spec/classes/params_spec.rb index e28296b..5d7236e 100644 --- a/spec/classes/params_spec.rb +++ b/spec/classes/params_spec.rb @@ -19,7 +19,7 @@ describe 'apt::params', :type => :class do it do expect { subject.call - }.to raise_error(Puppet::Error, /Unable to determine lsbdistid, is lsb-release installed/) + }.to raise_error(Puppet::Error, /Unable to determine lsbdistid, please install lsb-release first/) end end