My father contracted yellow fever many years ago. Trust me, it is a disease that you want to avoid. The long term health implications are serious and suffering through weeks of debilitating fever is rarely pleasant.
If your cruise is stopping in Brazil I don't believe that a yellow fever vaccination is required. However, if your cruise departs from or terminates in Brazil then, I believe, you are required to have the vaccination.