I\'m using puppet to configure servers. I want to print current machine (node) name in *.erb template. There is hostname variable, but this holds puppetmaster hostname.
Apparently you can now use
<%= fqdn %>
and get the DNS reverse name.
If you need to lowercase it, use
<%= fqdn.downcase %>