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

win reg - Support special chars in path #53305

Merged
merged 2 commits into from
Mar 7, 2019

Conversation

jborean93
Copy link
Contributor

@jborean93 jborean93 commented Mar 5, 2019

SUMMARY

The main part of this module is to support using special characters like / in a registry path. Previously / would be considered a path separator causing it to create a key within a key. The PR also changes win_reg_stat to work with the registry key's (Default) value. This is returned under the "" key if no name is set but can also be queried directly with name: ''. The property is considered to exist if a value has been set.

This first part includes a fix for win_regedit and win_reg_stat that is backportable to older branches. A future PR will include a deprecation warning for paths that currently use / as a path separator.

Fixes #41791.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

win_regedit
win_reg_stat

@ansibot
Copy link
Contributor

ansibot commented Mar 5, 2019

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community labels Mar 5, 2019
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Mar 5, 2019
@jborean93
Copy link
Contributor Author

After speaking with @nitzmahone we've agreed that the changes here are too big and are slightly a behavioral change. Because of this, it won't be backported to earlier releases but will be available in Ansible 2.8. The latest commit adds a deprecation warning when / is used in the path separators.

"HKCC:" { [Microsoft.Win32.Registry]::CurrentConfig }
"HKCU:" { [Microsoft.Win32.Registry]::CurrentUser }
"HKLM:" { [Microsoft.Win32.Registry]::LocalMachine }
"HKU" { [Microsoft.Win32.Registry]::Users }

Choose a reason for hiding this comment

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

I believe you're missing the colon after HKU here...

@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win_regedit handles '/' incorrectly when creating keys
5 participants