Does word "litany" have the same meaning in the following two sentences?

A litany of failures.

The patient recited a litany of complaints.
the same meaning