Ashraf Ghani will stay on as president, while Abdullah Abdullah will lead talks with the Taliban.