def zone_absent(domain, profile):
 zones = libcloud_dns_module.list_zones(profile)
 matching_zone = [z for z in zones if (z.domain == domain)]
 if (len(matching_zone) == 0):
  return state_result(True, 'Zone already absent')
 else:
  result = libcloud_dns_module.delete_zone(matching_zone[0].id, profile)
  return state_result(result, 'Deleted zone')

def zone_absent ( domain , profile ) : zones = libcloud_dns_module . list_zones ( profile ) matching_zone = [ z for z in zones if ( z . domain == domain ) ] if ( len ( matching_zone ) == 0 ) : return state_result ( True , 'Zone already absent' ) else : result = libcloud_dns_module . delete_zone ( matching_zone [ 0 ] . id , profile ) return state_result ( result , 'Deleted zone' )
ensures a record is absent .