If the resulting Spain from the Spanish Civil War is a Spanish People's Republic (which would be the 3rd Spanish Republic) under control of the PCE, I think this would be as neutral Spain due the Molotov-Ribbentrop Pact.
However, this Communist Spain could exploit the German invasion for even attack the French North Africa and the Portuguese Estado Novo claiming a struggle against fascism and colonialism, something like what the Soviet Union did after the pact, to create a large Ibero-African state formed by an union of several popular republics formed in the Maghreb, defending the speech that the three cultures peaceful during Al-Andalus times, claiming that the Berbers are the Spanish expelled after the Reconquista, etcetera; after all, the Spanish revolutionary movements have always supported the cause of the Iberian unification, it also involves the Spanish annexation of Andorra, Gibraltar, Roussillon and the Basque Country; and not forgetting the probable Communist revenge on the Moors who supported the Nationalists, may cause the official Spanish annexation of the Spanish Morocco and the international city of Tangiers.
Nevertheless, in this scenario, the most realistic possibility for me is the Iberian unification -including Azores, Cape Verde, Madeira and Sao Tome and Principe-, the Spanish annexation of the Morocco and Algerian region of Oran (whose European population was mainly of Spanish origin), besides the conquest Andorra, Gibraltar, Roussillon and the French Basque country when the Nazis or Vichy France decides to invade Spain when Operation Barbarossa occurs and the Spanish People's Republic is a new member of the Allies.