Variable to display application in server

Can you please tell me how to display application present in the server using variable
I am trying to display like this but its not working

host variable – $group.*
app variable – apps.$host.*

I am able to list down host details but application w.r.t that host is not getting displayed