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

add exclude_paths option to find module #52334

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
4 participants
@dirks
Copy link

dirks commented Feb 15, 2019

SUMMARY

Adds exclude_paths option to find module. This is similar to findutils find -path -prune option, i.e. find does not descend into paths listed in exclude_paths.

exclude_paths should be specified as relative path, e.g. './nginx/test,./dist-upgrade'

The reason to provide exclude_paths in addition to the exclude option are some limitations of exclude:

  • exclude excludes after the pattern was found.
  • exclude only works on basename patterns.
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

find

ADDITIONAL INFORMATION

I do not have any explicit unit tests (which would be nice), but used the the following args.json for testing

{
    "ANSIBLE_MODULE_ARGS": {
        "paths": "/var/log",
        "recurse": true,
        "file_type": "directory",
        "exclude_paths": "./nginx/test,./dist-upgrade,./something"
    }      
}
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.