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

sudoers: fix handling of state: absent (#4852) #4853

Merged
merged 2 commits into from
Jun 19, 2022
Merged

sudoers: fix handling of state: absent (#4852) #4853

merged 2 commits into from
Jun 19, 2022

Conversation

s-hamann
Copy link
Contributor

SUMMARY

This PR decouples the check for state == absent from the file existence check, so that run does not "fall through" into code paths intended for state == present.

fixes #4852

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

sudoers

ADDITIONAL INFORMATION

Refer to #4852. Please ask if anything is unclear.

@ansibullbot
Copy link
Collaborator

cc @JonEllis @JonEllis0
click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug integration tests/integration module module new_contributor Help guide this first time contributor plugins plugin (any type) system tests tests labels Jun 18, 2022
@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jun 18, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

changelogs/fragments/4852-sudoers-state-absent.yml Outdated Show resolved Hide resolved
tests/integration/targets/sudoers/tasks/main.yml Outdated Show resolved Hide resolved
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Jun 18, 2022
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jun 18, 2022
@JonEllis
Copy link
Contributor

LGTM. Thanks for fixing it!

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jun 19, 2022
@felixfontein felixfontein merged commit 44e21dd into ansible-collections:main Jun 19, 2022
@patchback
Copy link

patchback bot commented Jun 19, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/44e21dd407fa86a7de78258c52871b3db1b0f187/pr-4853

Backported as #4857

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@s-hamann thanks for fixing this!
@JonEllis thanks for reviewing!

patchback bot pushed a commit that referenced this pull request Jun 19, 2022
* sudoers: fix handling of state: absent (#4852)

* typo fixes

(cherry picked from commit 44e21dd)
@patchback
Copy link

patchback bot commented Jun 19, 2022

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/44e21dd407fa86a7de78258c52871b3db1b0f187/pr-4853

Backported as #4858

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jun 19, 2022
* sudoers: fix handling of state: absent (#4852)

* typo fixes

(cherry picked from commit 44e21dd)
felixfontein pushed a commit that referenced this pull request Jun 19, 2022
* sudoers: fix handling of state: absent (#4852)

* typo fixes

(cherry picked from commit 44e21dd)

Co-authored-by: s-hamann <[email protected]>
felixfontein pushed a commit that referenced this pull request Jun 19, 2022
* sudoers: fix handling of state: absent (#4852)

* typo fixes

(cherry picked from commit 44e21dd)

Co-authored-by: s-hamann <[email protected]>
bratwurzt pushed a commit to bratwurzt/community.general that referenced this pull request Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug integration tests/integration module module new_contributor Help guide this first time contributor plugins plugin (any type) system tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sudoers module does not handle state: absent properly
4 participants