What is the meaning of the idiom playing it close to the vest?

It means to not reveal too much about your actions (so that your opponent/enemy can't figure out your strategy).

The origin goes to cards. If you're holding your cards close to you, people can't peek (either to the side or over the shoulder) to see what you have and perhaps deduce your strength or strategy.