Is ensure used to mean the same thing in the next two sentences?

This nest egg will ensure a nice retirement for us.

Our exertions ensured us a good outcome.
the same meaning