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” However if I modify my recipe file as below, things work fine execute "apt-get update" do command "apt-get update -o Dir::Etc::sourcelist=/tmp/sources.list" ignore_failure false action :run end execute "install postgresql" do command "apt-get install -q -y -o Dir::Etc::sourcelist=/tmp/sources.list --no-list-cleanup postgresql" ignore_failure false action :run end Can someone in this forum please point out why the first recipe file is failing? Any help is immensely appreciated J Cheers, Ayesha |
Archive powered by MHonArc 2.6.16.