The Israeli government has ratified a ceasefire with Hamas, paving the way to end the war in Gaza within 24 hours and free Israeli hostages within 72 hours after that.