Hi,
This is a simple ansible script to create a zip file with date and time.
I want to fetch only the latest zip file to the destination server. How do I fetch only the latest file ?
`
- hosts: all
tasks: - name: Ansible zip the configuration directory
archive:
path: /home/admin/jboss/standalone/configuration
dest: /home/admin/jboss/standalone/configuration.{{ lookup(‘pipe’, ‘date +%Y%m%d%H%M%S’) }}.zip
format: zip
`
Regards,
Uday