This is the overriding answer to your question; It is further complicated by HOA's, Taxes, Gated/Not Gated, Ammenities, Common Grounds, etc.
If you are just trying to avoid yardwork, a simpler solution would be to buy a house on a nice small lot and hire a gardener to keep it nice.
For a townhouse, you own everything. So if you buy a 20 year old townhouse, you may have to replace the HVAC and roof in the next 2 to 3 years at an expense in excess of $10,000.
Be sure to read and understand the HOA documents, budget, newletters, financials, insurance, any litigation, and if you are purchasing with FHA if the complex is approved.
All the best to you.