-
Notifications
You must be signed in to change notification settings - Fork 168
Update docs and semantics of become key
#4905
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -1291,8 +1291,10 @@ class GuestData( | |||||||
| is_flag=True, | ||||||||
| option=('-b', '--become'), | ||||||||
| help=""" | ||||||||
| Whether to run tests and shell scripts in prepare and | ||||||||
| finish steps with ``sudo``. | ||||||||
| If set, user-provided commands - ``prepare`` and ``finish`` | ||||||||
| scripts and tests - will be invoked with elevated, superuser | ||||||||
| privileges. If the access plugin has is not a superuser | ||||||||
| already, passwordless ``sudo`` will be used. | ||||||||
|
Comment on lines
+1296
to
+1297
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| """, | ||||||||
| ) | ||||||||
|
|
||||||||
|
|
@@ -3739,9 +3741,9 @@ def reboot( | |||||||
| f"Guest '{self.multihost_name}' does not support hard reboot." | ||||||||
| ) | ||||||||
|
|
||||||||
| if self.become: | ||||||||
| if self.become and not self.facts.is_superuser: | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this is to be consistent with the other calls? |
||||||||
| default_reboot_command = ShellScript( | ||||||||
| f'sudo {default_reboot_command.to_shell_command()}' | ||||||||
| f'{self.facts.sudo_prefix} {default_reboot_command.to_shell_command()}' | ||||||||
| ) | ||||||||
|
|
||||||||
| command = command or default_reboot_command | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3778,6 +3778,6 @@ def safe_filename(template: str, phase: Phase, guest: 'Guest', **variables: Any) | |
| rendering the filename. | ||
| """ | ||
|
|
||
| template += '-{{ PHASE.safe_name }}-{{ GUEST.safe_name }}' | ||
| template += '-{{ PHASE.parent.name }}-{{ PHASE.safe_name }}-{{ GUEST.safe_name }}' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated change sneaked in?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, seems like it should have been in #4351
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmmm, might be. #4351 needs it for sure, but I think it breaks some tests in this PR as well. Need to recall what it was. |
||
|
|
||
| return Path(render_template(template, PHASE=phase, GUEST=guest, **variables)) | ||
Uh oh!
There was an error while loading. Please reload this page.