我正在努力在 Vagrant VM (Ubuntu 12.04) 上使用Opscode postgresql 食谱安装 PostgreSQL 9.2。
这是我的食谱:
node.set['postgresql']['version'] = "9.2"
node.set['postgresql']['enable_pgdg_apt'] = true
node.set['postgresql']['password'] = {postgres: "pwd"}
node.set['postgresql']['server']['packages'] = ["postgresql-9.2"]
include_recipe "postgresql::apt_pgdg_postgresql"
include_recipe "postgresql::server"
include_recipe "database"
运行结果如下:
[2013-05-23T11:00:52+00:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist:
template[/etc/postgresql/9.2/main/postgresql.conf] (postgresql::server line 60) had an error:
Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/postgresql/9.2/main does not exist.
我正在使用最新的 3.0.0 版本的 postgresql 食谱。
使用干净的 VM(vagrant destroy、up 等)从头开始重新运行所有内容会出现此错误:
[2013-05-23T11:16:37+00:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist:
template[/etc/postgresql/9.1/main/postgresql.conf] (postgresql::server line 60) had an error:
Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /etc/postgresql/9.1/main does not exist.
突然之间,我们甚至没有正确的版本。