- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: Re: Working with options on Package resource
- Date: Fri, 30 Mar 2012 11:57:11 +1300
Why not use the apt_repository lwrp to install your custom package
source (and GPG key?) instead of all these nasty executes.
You don't use apt like that usually do you?
--AJ
On 30 March 2012 10:32, Andrea Campi
<
>
wrote:
>
On Thu, Mar 29, 2012 at 12:01 PM,
>
<
>
>
wrote:
>
> Hi,
>
>
>
>
>
>
>
> I am using Chef for installing postgresql. I am using my own customized
>
> cookbook and not the one already available on the opscode community. The
>
> intention is to install postgresql by picking up the packages from a custom
>
> defined apt repository. I have created a custom sources.list and copied it
>
> to /tmp directory on the node where I am running this recipe. My
>
> sources.list looks like this
>
>
>
>
>
>
>
> deb http://10.94.147.248:8484/linux/ubuntu_10_x64/ /
>
>
>
>
>
>
>
> My recipe file looks like this
>
>
>
>
>
>
>
> execute "apt-get update" do
>
>
>
> command "apt-get update -o Dir::Etc::sourcelist=/tmp/sources.list"
>
>
>
> ignore_failure false
>
>
>
> action :run
>
>
>
> end
>
>
>
> package "postgresql" do
>
>
>
> action :install
>
>
>
> options "-o Dir::Etc::sourcelist=/tmp/sources.list --no-list-cleanup"
>
>
>
> end
>
>
>
>
>
>
>
> This however fails with the error “package[postgresql] (postgresql::client
>
> line 29) had an error: Chef::Exceptions::Package: No version specified, and
>
> no candidate version available for postgresql”
>
>
>
>
>
> Can someone in this forum please point out why the first recipe file is
>
> failing? Any help is immensely appreciated J
>
>
The package resource does not pass options to apt-cache.
Archive powered by MHonArc 2.6.16.