Might have been easier to use ports instead of port_range. So you could've done simply:

    ports params['port_range'].split(':') if params['port_range']

The firewall recipe should work even if we're passing strings instead of ints. But might be good not to rely on this, and do:

    ports params['port_range'].split(':').map(&:to_i) if params['port_range']