Tag: 供应

使用Chef安装Postgres在Vagrant VM上的问题:未定义方法`ruby’用于Config:Module

这就是我的Vagrantfile样子: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = “cookbooks” chef.json = { postgresql: { password: { postgres: ‘password’ } }, database: { create: [‘mydb’] }, ‘build-essential’ => { compiletime: true } } chef.run_list = [‘recipe[build-essential]’, ‘recipe[openssl]’, ‘recipe[postgresql::server]’, ‘recipe[database::postgresql]’] end 我也使用了precise32盒子。 当我的虚拟机启动后我的VM启动vagrant up ,我会得到很长的回溯,并显示错误消息: undefined method ruby’用于Config:Module`。 有没有人遇到过这个?

将命令行参数传递给vagrant shell脚本配置器

与此问题类似:将变量传递给vagrant中的shell脚本配置程序 我想将变量传递给shell脚本配置器,但我想在调用配置器时在命令行上设置这些变量。 这可能吗?