ignore errors

I am curious about this. It seems the answer would be to create separate playbooks for each item to remove, and run each of them in serial using a wrapper script? Or a playbook wrapping these three playbooks together?

Alternatively, if you wrap the “rpm” command in a shell script that always returns success, would that not work?

For that one I would use the yum module and state=removed.

Agreed - if you set state=removed then ansible won't emit an error if the pkg is already absent.

One thing it will do is emit an error if the pkg is nowhere.

ie: you say

yum state=removed pkg=lalal

currently the yum module will say "no package named lalal found anywhere"

which is more or less saying "are you sure you didn't typo that?"

-sv