The former energy secretary and Labour veteran was touted as a potential chancellor, but will take over from Yvette Cooper as foreign secretary.