On 2/2/21 12:13 PM, Deepak Gowda wrote:
> HI All,
> 
> I have a list of files in C:\Users\xxxuser\Downloads\ ,I am trying to find 
> out if i can pull the list of files/folders
> present in windows on the ansible node.
> 
> i have the below playbook which doesnt give any error nd doesn't give me a 
> list,
> 
> - hosts: windows
> 
>   tasks:
> 
>   - name: Find Files in Path
> 
>     win_find:
> 
>       paths: C:\Users\xxxuser\Downloads\
>       age: 2h
> 
> 

Hello Deepak,

I think you need to register the results to see the list of files:

- name: Find Files in Path
  win_find:
    paths: C:\Users\xxxuser\Downloads\
    age: 2h
  register: xxx_downloads

- debug:
    msg: "{{ xxx_downloads.files }}"

Regards
        Racke

> Thanks
> Deepak
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/d7027f1c-152e-4818-bc48-9df08df8de47n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/d7027f1c-152e-4818-bc48-9df08df8de47n%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/76b99808-7d39-7ab0-a229-099cb645d80f%40linuxia.de.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to