The basis of Paul's contentment is Christ in him "The Hope of Glory" (Colossians 1:27).
This contentment in no way undermines ambition, because the true believer can do all things through Christ who strengthens him.
What is necessary to achieve this kind of contentment is an abundant life that can be found only in Christ.