```ruby
primary = attrs['nodes'].find { |node| node['role'] == 'primary-controller' }
```