As has been reiterated time and time again, the FQDN is not available until at least one successful chef-client run. This is a minor pain, and I wondered if anyone had successfully found a workaround?
use hostname
resource.
depending how you utilize the hostname
resource -- if you use it in conjunction with compile_time
attribute set to true
, then the node['fqdn']
will be available in the convergence phase. otherwise, use lazy evaluation.