Shouldn't we simply check if this node has the role? That is:
```if node.roles.include? "ceilometer-swift-proxy-middleware"```