The Welsh ban will be introduced at the same time as Northern Ireland's. A ban already exists in Scotland.
Enclosed spaces in England will be covered by a ban on a so far unspecified date next summer.
First minister for Wales Rhodri Morgan said: "The risks of second-hand smoke have been known for some time. This is why the National Assembly voted to seek powers to ban smoking in enclosed public places."