Ban on gays in military ends