Op Felix was the German plan to invade Spain in order to take Gibraltar and seal off the Western end of the Med. Despite the aid given by the Germans and Italians to Franco during the civil war, they were unable to persuade him to join the Axis. he used the excuse that Spain was still recovering from the Civil war, but he also kept open some communications with the Allies.
If the Germans had been more successful in Russia, then Franco may well have thrown in his lot with the Axis powers. He raised a 'volunteer' force to send to Russia as an 'expeditionary' force. This was paid for and equipped by the Germans and became the 250 h Infantry Division in the German system. At home in Spain, it was referred to as the 'Division Azul' or Blue Division' due to the blue Falangist uniform shirts they wore.
Franco withdrew the division when he realised that the war was going badly for the Germans, although a number of men stayed behind to continue the fight against communism. It is said that by showing how well Spanish troops fought (which they did) that Franco was sending a message to Hitler to say that an invasion of Spain would not be an easy proposition and would meet with fierce resistance.
For a really good read, then I would recommend 'Hitlers Spanish Legion' by Gerald R Kleinfeld & Lewis A Tambs.
“O Lord God, let me not be disgraced in my old days.”
'We few, we happy few, we band of brothers'