我正在开发一个厨师食谱,我正在与流浪和厨师独奏进行测试。食谱看node.name
做出某些决定。为了测试各种变体,我想重写Vagrant的测试运行属性。所以我试了如何覆盖流浪汉中的厨师节点名称?
Vagrant.configure("2") do |config|
...
config.vm.provision :chef_solo do |chef|
...
chef.json = {
'name' => 'randomhostname',
}
end
end
但似乎没有效果。
我明白name
属性默认为hostname
属性,这是由ohai管理(见this question),但有没有办法覆盖name
属性?
这就是我正在寻找的。显然没有记录。 –
是的。我发现这是因为['Vagrant :: Butcher'](http://github.com/cassianoleal/vagrant-butcher)的用户提交了一个错误。 :) – cassianoleal
正在修复文档:https://github.com/mitchellh/vagrant/issues/1780 –