我有节点的配方和属性文件。例如 localhost 和 linode。我试图让属性文件在默认或其他属性之前先加载(并设置主机名等)。例子:
属性/localhost.rb:
default[:hostname] = "localhost"
default[:nginx][:hostname] = 'mbdev-localhost'
include_attribute 'mbdev::common'
属性/common.rb
default[:nginx][:website1][:url] = "subdomain." + default[:nginx][:hostname]
食谱/localhost.rb
include_recipe 'mbdev::default'
运行列表:
'mbdev::localhost'
但是,似乎 include_attribute 使“通用”属性首先加载。所以 nginx-hostname 还没有设置...
我得到的顺序是:1)加载属性/default.rb 2)加载属性/common.rb 3)关于+的错误
如何让 localhost.rb 在 common.rb 之前加载?