This should be:

```ruby
only_if { node['platform_family'] == 'ubuntu' }
```

as the non-block form is interpreted as a command to run. You could also use `platform_family?` probably.