We have carried out a survey for CO J= 1-0 and J= 2-1 emission in the 260 early-type galaxies of the volume-limited ATLAS3D sample, with the goal of connecting their star formation and assembly histories to their cold gas content. This is the largest volume-limited CO survey of its kind and is the first to include many Virgo cluster members. Sample members are dynamically hot galaxies with a median stellar mass ∼3 × 1010 M⊙; they are selected by their morphology rather than colour, and the bulk of them lie on the red sequence. The overall CO detection rate is 56/259 = 0.22 ± 0.03, with no dependence on the K luminosity and only a modest dependence on the dynamical mass. There are a dozen CO detections among the Virgo cluster members; statistical analysis of their H2 mass distributions and their dynamical status within the cluster shows that the cluster's influence on their molecular masses is subtle at best, even though (unlike spirals) they seem to be virialized within the cluster. We suggest that the cluster members have retained their molecular gas through several Gyr residences in the cluster. There are also a few extremely CO-rich early-type galaxies with H2 masses ≳109 M⊙ and these are in low-density environments. We do find a significant trend between the molecular content and stellar specific angular momentum. The galaxies of low angular momentum also have low CO detection rates, suggesting that their formation processes were more effective at destroying the molecular gas or preventing its re-accretion. We speculate on the implications of these data for the formation of various subclasses of early-type galaxies.