Spanish Football Federation sacked head coach Julen Lopetegui before the World Cup in Russia, after the Spaniard signed a contract with Real Madrid on Tuesday.