It would be the best deduction, and may be your only option, is to place the roof under depreciation for the 27.5 year recovery as Improvements while in the Rental activity. You will be asked about whether you qualify to take a deduction in the current year. See below why you would not qualify. Since you are selling within the next two years, this would not be a huge advantage to you regardless.
Keep in mind that depreciation must be recaptured whether or not you take it. The IRS tax law specifically states allowed or allowable.
The safe harbor election for small taxpayers lets you deduct improvements as expenses this year instead of being depreciated over many years.
You can do this if: