Properly using the variable defined in hosts