Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_find: No option for setting recursion depth #335

Open
sunishsurendrank opened this issue Feb 6, 2022 · 1 comment
Open

win_find: No option for setting recursion depth #335

sunishsurendrank opened this issue Feb 6, 2022 · 1 comment

Comments

@sunishsurendrank
Copy link

SUMMARY

When using the module win_find with recursion, it will be good if user can specify the depth of recursion.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_find

ANSIBLE VERSION
ansible [core 2.11.7]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/<username>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  ansible collection location = /etc/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
  jinja version = 3.0.3
  libyaml = True
COLLECTION VERSION
# 
Collection      Version
--------------- -------
ansible.windows 1.8.0
CONFIGURATION
COLLECTIONS_PATHS(/etc/ansible/ansible.cfg) = ['/etc/ansible/collections']
STEPS TO REPRODUCE
    - name: Get creation date
      win_find:
        paths: "c:\test"
        recurse : yes
        depth: 2
        file_type: directory
EXPECTED RESULTS

List all directories two levels down

ACTUAL RESULTS
 FAILED! => {"changed": false, "msg": "Unsupported parameters for (win_find) module: depth. Supported parameters include: use_regex, file_type, follow, size, get_checksum, checksum_algorithm, hidden, patterns, recurse, age_stamp, age, paths, regex, regexp"}
@jborean93
Copy link
Collaborator

Sounds like a sane addition to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants