Robert Gates waves and President Obama claps at the then-defense secretary’s farewell ceremony in June 2011.