Let's say it's more than one unit. One can definitely reserve a unit for himself and rent out the other. The other units can more than cover whatever mortage and tax, insurance, maintenance on the whole place.
There may be more complicating factors involved.