It's part of the standard ethics/EO/whatever training that we all receive in basic training and every year thereafter. There was nothing specific to Obama that I am aware of.
We can’t campaign in any official capacity or attend marches while in uniform or speak for the military (all of this is null and void if you’re talking about attending gay pride events, of course), but we can still express individual views. Senior officers need to be pretty careful since they’re existence is inextricably intertwined with military policy.