modified provider to handle both profile_name and hostname