That won't work in a townhome here the land of home owners associations. And to be honest I wouldn't be happy if any of my neighbors tacked a roaring tankless box on the front of their houses. Ugly, loud, hot... It would be OK on the rear but if I could get there I could run a vent there. But the lower level is finished and the utility room with piping access is all the way at the front of the house. And there are potential vent issues out back, too as I have a deck above and probably couldn't get the required vertical cleaance.
I have given up on this idea as the cost to install in my situation would be several times the lifetime savings....and that's if I did it myself. If I had to have a contractor in it would be even worse. Tankless is a good idea but just makes no sense in my situation.