# find module to scan sub directories need help

**URL:** <https://forum.ansible.com/t/find-module-to-scan-sub-directories-need-help/35567>\
**Category:** Ansible Project\
**Created:** [July 29, 2021, 7:02pm UTC](https://forum.ansible.com/t/find-module-to-scan-sub-directories-need-help/35567 "2021-07-29T19:02:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://forum.ansible.com/u/Raj)\
**Post date:** [July 29, 2021, 7:02pm UTC](https://forum.ansible.com/t/find-module-to-scan-sub-directories-need-help/35567/1 "2021-07-29T19:02:58Z")

</div>

Hi All,

I am trying to find files in sub directory like the first server path: /opt/test/x/y/z/file.txt each server has different paths.

I am using find module it checking for current directory as mention /opt/test\*

code:

- name: Get SSL path  
ignore\_errors: false  
find:  
paths: /opt/test\* ----\> after test directory will on all servers  
patterns: ‘\*.jks’

TIA

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [July 29, 2021, 7:20pm UTC](https://forum.ansible.com/t/find-module-to-scan-sub-directories-need-help/35567/2 "2021-07-29T19:20:27Z")

</div>

> Hi All,
> 
> I am trying to find files in sub directory like the first server path: /opt/test/x/y/z/file.txt each server has different paths.
> 
> I am using find module it checking for current directory as mention /opt/test\*
> 
> code:  
> - name: Get SSL path  
> ignore\_errors: false  
> find:  
> paths: /opt/test\* ----\> after test directory will on all servers  
> patterns: '\*.jks'

Hello Raja,

I'm not sure what you really after, but recurse: yes is certainly mentioned multiple times in the Ansible docs.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke
