I’m altering the system hostname in my base cookbook and using the node[:fqdn] in later cookbooks generating configuration data etc.
The problem I get is node[:fqdn] does’t get updated after the hostname change. Even tho I do reload ohai after changing. ( I’m using chef-solo )
The second converge passes the tests as the hostname is correct when ohai reads.
So my questions are
Does ohai action :reload work with chef-solo? Would node.set[:fqdn] = “new” work from within the recipe changing the hostname. Is this hackish ? Are there any alternative methods to get the result I’m looking for?
Appreciate the help