I want to search for files modified last 1day and add them to archive. I 
dont see all the matched files added to the destination zip file but see 
only the last file in the zip

ansible --version
ansible 2.3.1.0
  config file = /Volumes/Projects/dat/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 
Compatible Apple LLVM 8.0.0 (clang-800.0.34)]

.......

- name: find files
  find:
    paths: /var/log/hadoop-hdfs
    age: -1d
    age_stamp: mtime
    file_type: file
  register: files_matched


- name: archive found files
  archive:
    path: "{{ item.path }}"
    dest: /tmp/hadoop2.zip
    format: zip
  with_items: "{{ files_matched.files }}"

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5f36bc1d-4718-4df2-9423-29ba7834e02f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to