Here is one sentence: This nest egg will ensure a nice retirement for us.
Here is another sentence: Our exertions ensured a good outcome.
Does the term ensure mean the same thing in both these sentences?
the same meaning