How to delete *.web files only if they exist

Question:

I need to create an Ansible playbook to delete the *.web files in a specific directory only if the files exists.

OS : cent OS, Redhat 5x, 6x.

I have tried the following with no success:

Answer:

Here’s an example of “the fancy way”:

Leave a Reply