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.
Have you bought yet?
If so, when did you buy?
What circumstances are leading you to need to rent it out?
If you have not bought, and are just wondering if you can game the system and buy as an owner occupant to get the owner occupant rate, to then turn around and rent it, that is mortgage fraud and you should not do that. Just buy it as an investment property and pay the investment property rate, it's not that much higher, and it's better to tell the truth.
If you have lived there for a half of a year, for example, and there are circumstances that are causing you to need to rent it out, like a job relocation, or moving in with a significant other, or financial issues, then rent it out to do what you need to do.
Make sure you ask your agent what the rental restrictions are in the community before you purchase.