In his previous assignment , from November 2001 to August 2003 , General Moseley was the Air Force commander for the Middle East , in charge of the bombing campaign during the war in Afghanistan and of the air war for the invasion of Iraq .