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

Windows - fix scenario when a vault string is used as the credentials #57662

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@jborean93
Copy link
Contributor

commented Jun 11, 2019

SUMMARY

When using an inline vault string for ansible_user in both the winrm and psrp connection plugins it will fail as it expects a string. This fixes up this problem and also forces ansible_password to be a string which was problematic on psrp.

Also document the ansible_<connection>_pass/password vars to align with the normal standard we have for password management in Ansible.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

winrm
psrp

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

@ansibot ansibot added core_review and removed needs_revision labels Jun 11, 2019

self._psrp_pass = self._play_context.password
if self._psrp_user is not None:
# In case of an in-line vault string we want to convert to a text string
self._psrp_user = to_text(self._psrp_user)

This comment has been minimized.

Copy link
@nitzmahone

nitzmahone Jun 11, 2019

Member

Seems like maybe get_option should handle this internally, just like with templating... @bcoca, thoughts?


self._psrp_pass = self.get_option('password')
if self._psrp_pass is not None:
self._psrp_pass = to_text(self._psrp_pass)

This comment has been minimized.

Copy link
@nitzmahone
@nitzmahone
Copy link
Member

left a comment

OK by me so long as it doesn't just move into get_option- may also be moot if AnsibleVaultUnicodeText is rolled into the shared wrapper with the deprecated vars/facts support.

@ansibot ansibot added the stale_ci label Jun 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.