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

added password prompt support for machinectl #4849

Merged
merged 5 commits into from
Jul 8, 2022
Merged

added password prompt support for machinectl #4849

merged 5 commits into from
Jul 8, 2022

Conversation

Louis9902
Copy link
Contributor

SUMMARY

This allows the use of machinectl without being root by using the polkit auth dialog.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

community.general.machinectl

ADDITIONAL INFORMATION

Example polkit rule in comments look strange, but I found no other example on how to include a multiline code snippet.

@ansibullbot
Copy link
Collaborator

cc @None
click here for bot help

@ansibullbot ansibullbot added become become plugin feature This issue/PR relates to a feature request new_contributor Help guide this first time contributor plugins plugin (any type) labels Jun 17, 2022
@Louis9902
Copy link
Contributor Author

Louis9902 commented Jun 17, 2022

I assume the sanity test failed at the yaml lint step because of the polkit rule example. Can someone please help me and point me to some example on how to do this correctly.

EDIT:
Okay, seems to be a python2 problem. Since I'n not a python expert, how can I resolve this compat problem?

@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 17, 2022
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Jun 17, 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! Please add a changelog fragment.

plugins/become/machinectl.py Outdated Show resolved Hide resolved
plugins/become/machinectl.py Outdated Show resolved Hide resolved
plugins/become/machinectl.py Outdated Show resolved Hide resolved
plugins/become/machinectl.py Outdated Show resolved Hide resolved
This includes the review comments as well as changelog fragment. This also gives more information about the polkit rule.
@ansibullbot ansibullbot removed the ci_verified Push fixes to PR branch to re-run CI label Jun 18, 2022
@Louis9902 Louis9902 requested a review from felixfontein June 18, 2022 07:47
@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
@Louis9902 Louis9902 requested a review from felixfontein June 18, 2022 16:52
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI labels Jun 20, 2022
@Louis9902 Louis9902 requested a review from felixfontein June 21, 2022 05:36
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.

I have never used machinectl so I don't know whether the change is correct, but at least formally it looks ok :) If nobody complains, I'll merge this for 5.3.0.

@Louis9902
Copy link
Contributor Author

I only use it when I need to use systemd's systemctl on the other account, since it starts a user session and so systemctl --user works correctly.

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Jul 2, 2022
@felixfontein felixfontein merged commit 35ddf31 into ansible-collections:main Jul 8, 2022
This was referenced Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
become become plugin feature This issue/PR relates to a feature request new_contributor Help guide this first time contributor plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants