Obama ends ban on gays in military