Use an `only_if` guard instead of vanilla Ruby

Like it says on the tin; more Chef-like