- From: Charles Duffy <
>
- To: chef-users <
>
- Subject: [chef] "Cannot find a provider for script[wait for pgsql startup] on centos version 5.5 (ArgumentError)"
- Date: Sun, 6 Feb 2011 02:27:40 -0600
Per subject, using Chef 0.9.8. I'm a bit miffed.
script "wait for pgsql startup" do
interpreter "bash"
user "postgres"
group "postgres"
path ["#{node[:postgresql90][:pgbin]}", "/bin", "/usr/bin"]
code <<-EOH
retries=0
while (( $retries < 10 )); do
if psql -U postgres template1 </dev/null ; then
exit 0
fi
retries=$(( retries + 1 ))
sleep 1
done
exit 1
EOH
action :nothing
end
service "postgresql-9.0" do
action [ :enable, :start ]
notifies :run, "script[wait for pgsql startup]", :immediate
end
# ... other things happening below here need the database to be actually available
- [chef] "Cannot find a provider for script[wait for pgsql startup] on centos version 5.5 (ArgumentError)", Charles Duffy, 02/06/2011
Archive powered by MHonArc 2.6.16.