People living in a part of Wales had been left without water