I'm trying to delete all files which have the prefix git from the directory /usr/local/bin/ and /usr/bin/. But ansible don't seem to delete the files.
I tried using file module:
file:
path: "{{ item }}"
state: absent
with_items:
- '/usr/local/bin/git*'
- '/usr/bin/git*'
but it's not working.