def remove_record(module, gcdns, record):
 overwrite = module.boolean(module.params['overwrite'])
 ttl = module.params['ttl']
 record_data = module.params['record_data']
 if (record is None):
  return False
 if (not overwrite):
  if (not _records_match(record.data['ttl'], record.data['rrdatas'], ttl, record_data)):
   module.fail_json(msg=(('cannot delete due to non-matching ttl or record_data: ' + ('ttl: %d, record_data: %s ' % (ttl, record_data))) + ('original ttl: %d, original record_data: %s' % (record.data['ttl'], record.data['rrdatas']))), changed=False)
 if (not module.check_mode):
  gcdns.delete_record(record)
 return True

def remove_record ( module , gcdns , record ) : overwrite = module . boolean ( module . params [ 'overwrite' ] ) ttl = module . params [ 'ttl' ] record_data = module . params [ 'record_data' ] if ( record is None ) : return False if ( not overwrite ) : if ( not _records_match ( record . data [ 'ttl' ] , record . data [ 'rrdatas' ] , ttl , record_data ) ) : module . fail_json ( msg = ( ( 'cannot delete due to non-matching ttl or record_data: ' + ( 'ttl: %d, record_data: %s ' % ( ttl , record_data ) ) ) + ( 'original ttl: %d, original record_data: %s' % ( record . data [ 'ttl' ] , record . data [ 'rrdatas' ] ) ) ) , changed = False ) if ( not module . check_mode ) : gcdns . delete_record ( record ) return True
remove a resource record .