I’m not sure I understand what you’re really after. There are two ways that could help addressing the issue.
- Technically -
Host.unscoped.find_by(:name => proxy_name).id
- Semantically - see Infrastructure roles, we should able to detect hosts running proxies