Getting attribute in Jinja2 templates

also FYI -- in the original post, the variable that the OP wants to
access is "hostvars", not "hosts".