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

pbrun: Use default value for become_user #59754

Merged
merged 3 commits into from
Jul 30, 2019
Merged

pbrun: Use default value for become_user #59754

merged 3 commits into from
Jul 30, 2019

Conversation

nick6655
Copy link
Contributor

Require ternary operator for if get_option('user') returns NoneType object.

SUMMARY

With all other become plugins user assignment is done with a ternary operator to default to '' if no user option is returned. This should be the same for pbrun become plugin.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

pbrun

ADDITIONAL INFORMATION

Require ternary operator for if get_option('user') returns NoneType object.
@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. 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 support:community This issue/PR relates to code supported by the Ansible community. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Jul 29, 2019
@nick6655
Copy link
Contributor Author

nick6655 commented Jul 29, 2019

The testing failure marking needs_revision isn't the result of my change.

@Akasurde Akasurde changed the title Update pbrun.py pbrun: Use default value for become_user Jul 30, 2019
@ansibot ansibot added has_issue community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 30, 2019
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jul 30, 2019
Added default value to become_user in documentation.
Changed default for become_user to be '' instead of root.
lib/ansible/plugins/become/pbrun.py Outdated Show resolved Hide resolved
@bcoca bcoca merged commit 1d560e5 into ansible:devel Jul 30, 2019
@nick6655 nick6655 deleted the patch-1 branch July 30, 2019 17:14
@bcoca
Copy link
Member

bcoca commented Jul 30, 2019

@nick6655 want to create a backport for 2.8?

@nick6655
Copy link
Contributor Author

@bcoca I am ignorant to the process of creating a backport. Looking now to see if I can figure it out but not sure the ETA on that.

@bcoca
Copy link
Member

bcoca commented Jul 30, 2019

a quick guide to backports
https://docs.ansible.com/ansible/latest/community/development_process.html#backporting-merged-prs

nick6655 added a commit to nick6655/ansible that referenced this pull request Jul 31, 2019
* Update pbrun.py

Require ternary operator for if get_option('user') returns NoneType object.

* Update pbrun.py

Added default value to become_user in documentation.

* Update pbrun.py

Changed default for become_user to be '' instead of root.

(cherry picked from commit 1d560e5)
@nick6655
Copy link
Contributor Author

@bcoca #59839 has been created to backport changes.

abadger pushed a commit that referenced this pull request Jul 31, 2019
* Update pbrun.py

Require ternary operator for if get_option('user') returns NoneType object.

* Update pbrun.py

Added default value to become_user in documentation.

* Update pbrun.py

Changed default for become_user to be '' instead of root.

(cherry picked from commit 1d560e5)
@ansible ansible locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. has_issue new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants