Countries in Africa are looking toward energy resilience as the war in Iran exposed their dependence on oil imports.