A Carlitz module analogue of the Grunwald--Wang theorem