The Andy Griffith Show
Goodbye, Sheriff Taylor (5x10)
:
While Andy is away in Raleigh considering a job offer, Barney is left as acting sheriff and dreams of the day he'll have the job. When he ends up causing more trouble than he prevents, he wonders if he really wants the job as much as he thought.