I’ve posted a gist:
https://gist.github.com/darKoram/6993766
The ansible_managed variable is a special variable passed through to templates, the other configuration settings are not.
The configuration setting “hostfile” isn’t surfaced to templates as an output variable.
This is actually true of most configuration settings.
Also, what James said