Defense Secretary Robert Gates , speaking one day after he was formally tapped to stay on in the next administration , said Tuesday he has made an " open-ended " agreement to remain at the helm of the nation 's military under Barack Obama .