Can we claim tax deductions when renting out primary residence?

Question: We are moving interstate and own a property with a $300,000 mortgage that we would like to keep as an investment property.  I would like to know: (1) Is it true that if we keep this as our primary residence we won’t pay capital gains tax if we sell within six years. (2) Can we claim tax deductions connected with …