I have recipes and attribute files for nodes. For instance. localhost and linode. I try to load the attribute file first (and set the hostname, etc.) before the standard or other attributes. Example:
attributes / localhost.rb:
default[:hostname] = "localhost" default[:nginx][:hostname] = 'mbdev-localhost' include_attribute 'mbdev::common'
attributes / common.rb
default[:nginx][:website1][:url] = "subdomain." + default[:nginx][:hostname]
Recipes / localhost.rb
include_recipe 'mbdev::default'
runlist:
'mbdev::localhost'
However, it seems that include_attribute first loads the attribute 'common'. And so nginx-hostname is not set yet ...
The order I receive: 1) Loading attributes /default.rb 2) Loading attributes /common.rb 3) Error about +
How can I get localhost.rb to load before common.rb?
source share