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
Switch to LiteralPath instead of Path. Closes #44508 #44509
Switch to LiteralPath instead of Path. Closes #44508 #44509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to add a changelog fragment for this fix?
@jborean93 like so? |
The test
|
@crossan007 are you able to create a backport PR to bring the fix to the stable-2.6 branch. Details on how to do this can be found here https://docs.ansible.com/ansible/latest/community/development_process.html#pull-requests. |
* devel: (513 commits) Fix systemd service is already masked issue (#44730) fix issue with no_log in py3 modules/terraform: Quote the variable values in the command line (#43493) YUM4/DNF compatibility via yum action plugin (#44322) BOTMETA.yml: remove superfluous labels (#44628) Share the implementation of hashing for both vars_prompt and password_hash (#21215) one_host environment variables, Fixes #44163 (#44568) ec2: add "IAM Role" to instance_profile_name ios_vrf speed fix (#43765) fix typo (#44712) junos cli_config idempotence fix (#44706) Switch to LiteralPath instead of Path. Closes #44508 (#44509) Module win_domain_computer fix delete computer with child (#44500) ACME: improve documentation (#44691) doc: fixed typo (#44685) IPA: Add option to specify timeout (#44572) Added nios_txt_record module (#39264) adds the bigip_cli_script module (#44674) Clean up BOTMETA.yml (#44574) Change validate-modules for removed modules ...
SUMMARY
Change all instances of
-Path
to-LiteralPath
Closes #44508
Similar to https://github.com/ansible/ansible/pull/37901/files#diff-62fd6612943ccdb6cd026094c9d4763bR90
ISSUE TYPE
COMPONENT NAME
win_lineinfile
ANSIBLE VERSION
ADDITIONAL INFORMATION
https://www.reddit.com/r/PowerShell/comments/2wmzv8/why_you_should_consider_always_using_literalpath/
It's worth noting that the bracket usage within PowerShell paths does provide some functionality; however, I believe that the majority of Ansible playbook authors are not expecting PowerShell variable expansion / interpretation to occur on the paths passed to
win_lineinfile
.