The 41-year-old is currently enjoying a sabbatical in New York after his departure from Barcelona at the end of last season, and he hinted the position could interest him in the coming years.
"Coaching the national team? You never know what could happen," Guardiola said at an annual event in Mexico City, organized by Fundacion Telmex - the charity of telecoms tycoon Carlos Slim.
|LA LIGA LATEST
"I will make my comeback once I have the desire to coach again, but that's not the case just yet."
The former midfielder then looked back on his time at Barca, and stressed that he never planned to spend his entire career in Catalunya.
"I never had the intention to stay at Barcelona my entire life. It was a stage in my life and I had a great time. The time to move on had come, though, so I decided to quit.
"It was all about entertaining the fans at Barcelona. The crowd have to enjoy watching football. I stuck to a tradition that was started by Johan Cruyff, who also had a great group of players."
Guardiola won an impressive 14 trophies during his four years at the Blaugrana.