Assume we have a connected CW-complex $Y$ and $X\hookrightarrow Y$ a connected sub-complex. We know that the inclusion induces injection on all homotopy groups. Is it true (or under what conditions it can be true) that we can attach cells to $Y$ so that the inclusion induces isomorphism on homotopy groups? (This will subsequently imply that $X$ is a deformation retract of the enlarged $Y$.)

You can further more assume that the inclusion of $X$ is a map of infinite loop spaces. If that helps.