Skip to content

Avoids removing / #80034

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

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

Avoids removing / #80034

wants to merge 2 commits into from

Conversation

ebastos
Copy link

@ebastos ebastos commented Feb 18, 2023

SUMMARY

This change will make Ansible refuse to delete "/"

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/modules/file.py

ADDITIONAL INFORMATION

According to #18943

@ansibot ansibot added affects_2.15 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. small_patch labels Feb 20, 2023
@webknjaz
Copy link
Member

Looks like this needs a changelog fragment, an integration test and probably a toggle like rm does (--[no-]preserve-root).

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Feb 21, 2023
@bcoca
Copy link
Member

bcoca commented Feb 21, 2023

bikeshedding: a protected_paths option that defaults to [ '/' ]

@ebastos
Copy link
Author

ebastos commented Feb 21, 2023

I will be happy to do it if I can get some pointers @webknjaz / @bcoca

@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 Mar 1, 2023
@webknjaz
Copy link
Member

@ebastos locate the arg spec in the module and declare a new argument as Brian suggested. Then, make use of that argument in your if-clause. You'll probably need to pass some args around, down the call stack.

@jborean93
Copy link
Contributor

@ebastos is the above request something you still interested in working on? If you need help for specific things we can certainly guide you along the way.

@s-hertel s-hertel self-assigned this Mar 20, 2024
@webknjaz

This comment was marked as resolved.

This comment was marked as resolved.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed 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 Apr 16, 2024
@webknjaz
Copy link
Member

This PR branch needs a rebase.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 17, 2024
@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 May 1, 2024
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.15 bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. 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. new_contributor This PR is the first contribution by a new community member. small_patch 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_pr This PR has not been pushed to for more than one year.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants