At the end of the day it's your property and you make the decision... but consider what you agreed on with your lender.
If you have a conventional loan, there are restrictions on qualifying for a loan backed by Fannie/Freddie to purchase another primary residence. Unless you can document that the home you wish to rent out has at least 30% equity, you must document that you have at least 6 months' reserves for BOTH mortgages (principal, interest, taxes, insurance, HOA if applicable) in order to qualify for the new mortgage. Rental income from the property to be converted to invetsment cannot be used for income qualifying unless you can document 30% or more equity in the home (using an appraisal, AVM, or Broker Price Opinion from your Realtor).
2 Yrs. out of LAST 5 yrs. is the rule for Primary residence. For example you moved out in August 31st 2008 and rented then till August 30 2011 (recorded) it is still considered your primary to avoid capital gains. BUT if you close after that then you may not be able to avoid capital gains.
I think Q needs to be little more precise and situation oriented to help If I were you I would ask a tax advisor.
Make sure you ask your agent what the rental restrictions are in the community before you purchase.