coroutine/chef-postgresql — pull request #14 by ramontayag (2013-02-02 07:06:36+00:00)
Title: Use different bash script name for the database creation to allow creation of more than 1 db

When I turned on the verbose option of knife, I saw that the not_if of the database setup was checking for the existence same database -- the first database. That means if you had more than 1 database that you wanted to create, it would not create the databases after the first. Without looking into the chef code at all, my guess is that the code:

bash "something" do
#...
end

saves the key "something" in a big hash somewhere. That means declaring another `bash "something"` later on will cause conflicts.

If this is the case, creation of multiple users is probably broken too.