find module to scan sub directories need help

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

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
          Racke