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

Feature: add owner and group filter to builtin.find #76768

Open
wants to merge 23 commits into
base: devel
Choose a base branch
from

Conversation

phoehnel
Copy link
Contributor

@phoehnel phoehnel commented Jan 15, 2022

SUMMARY

Adds new parameters to builtin.find to be able to filter results by owner and group.
See examples below for clarification.

The filters are built in a similar way to the existing age and size filter.
They work on the existing data after the file list is obtained.
The filters work for directories, files and links.

Fixes #76586

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible.builtin.find

ADDITIONAL INFORMATION
How to Use
- name: find all elements owned by user and group example
    find: 
        paths: /opt/myapp
        user: example
        group: example

- name: find all elements owned by one of the user in a given list
  find:
    paths: /etc
    users:
      - user1
      - user2

@ansibot

This comment was marked as outdated.

@ansibot ansibot added affects_2.13 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jan 15, 2022
@phoehnel phoehnel changed the title Feature/add permission filter Feature: add permission filter to builtin.find Jan 15, 2022
@ansibot

This comment was marked as outdated.

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Jan 15, 2022
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 15, 2022
@ansibot

This comment was marked as outdated.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jan 15, 2022
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jan 23, 2022
@ansibot ansibot added stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_review Updates were made after the last review and the last review is more than 7 days old. labels Mar 2, 2022
@ansibot ansibot removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_review Updates were made after the last review and the last review is more than 7 days old. labels Jun 20, 2023
@ansibot ansibot added stale_review Updates were made after the last review and the last review is more than 7 days old. has_issue labels Jul 12, 2023
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Aug 22, 2023
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Oct 24, 2023
@webknjaz

This comment was marked as resolved.

@azure-pipelines

This comment was marked as resolved.

@webknjaz
Copy link
Member

This needs a rebase.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Oct 26, 2023
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. labels Oct 26, 2023
@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 5, 2024
@phoehnel
Copy link
Contributor Author

phoehnel commented Feb 5, 2024

@webknjaz rebase is done! 👍🏻

@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Feb 5, 2024
@sivel
Copy link
Member

sivel commented Feb 5, 2024

Outside of the rebase, the permissions functionality will need removed, as it has already been implemented in ca08261 via a slightly different mechanism.

Note, I've not performed any review of this PR.

@phoehnel phoehnel changed the title Feature: add permission, owner and group filter to builtin.find Feature: add owner and group filter to builtin.find Feb 5, 2024
@phoehnel phoehnel requested a review from bcoca February 5, 2024 15:37
@phoehnel
Copy link
Contributor Author

phoehnel commented Feb 5, 2024

Outside of the rebase, the permissions functionality will need removed, as it has already been implemented in ca08261 via a slightly different mechanism.

ah fair! didn't saw that. Removed the function now

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 19, 2024
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.13 feature This issue/PR relates to a feature request. has_issue module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html P3 Priority 3 - Approved, No Time Limitation stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_review Updates were made after the last review and the last review is more than 7 days old. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add executable option to ansible.builtin.find
7 participants