A new Australian deputy prime minister has been appointed after his predecessor quit over a sexual harassment allegation.