The U.S. military says coalition soldiers in Iraq have killed 24 insurgents who attacked a coalition convoy outside Baghdad .