- From: Andrea Campi <
>
- To:
- Subject: [chef] Re: Working with options on Package resource
- Date: Thu, 29 Mar 2012 22:32:36 +0100
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.