I’m trying to clear a directory with certain file names based on a pattern and it doesn’t seem to work:
- name: Remove any extant jars
file: name=“{{app_home}}/server/deploy/{{item}}” state=absent
with_items: - “token.jar”
- “opm.jar”
- “pf-sm.jar”
This isn’t working; the existing jars stay there even though Ansible reports “CHANGED” on all three.
I need this since these jars have their versions in their names and I need to make sure that they are deleted prior to pushing the updated files.
Thanks,
__________________________________________________________________
The information contained in this email message and any attachment may be privileged, confidential, proprietary or otherwise protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof.