The Andy Griffith Show
The Bank Job (3x13)
:
Barney becomes convinced the Mayberry bank is ripe for a robbery and tries to prove his point by staging a fake one. When he discovers a weak spot in the security system, he unknowing relays this information to a couple of actual robbers.