President Cyril Ramaphosa says the military will work with the country's police force to counter 'gang wars'.