diff options
author | Jordan Borean <jborean93@gmail.com> | 2018-07-31 07:48:54 +1000 |
---|---|---|
committer | Matt Davis <nitzmahone@users.noreply.github.com> | 2018-07-30 14:48:54 -0700 |
commit | 9259f31fee03e75a99a23b9fde5106b43f0cc437 (patch) | |
tree | 56c10a1eab499632f2059b0f7b3a177ecaba38f0 /lib/ansible/plugins/shell | |
parent | d79027b77fb30d45cd322a54f151c559b11bc1ad (diff) | |
download | ansible-9259f31fee03e75a99a23b9fde5106b43f0cc437.tar.gz |
Add Ansible.ModuleUtils.PrivilegeUtil and converted code to use it (#43179)
* Add Ansible.ModuleUtils.PrivilegeUtil and converted code to use it
* Changed namespace and class to be a better standard and fixed some typos
* Changes from review
* changes to avoid out of bound mem of server 2008
* changes to detect failure when setting a privileged not allowed
Diffstat (limited to 'lib/ansible/plugins/shell')
-rw-r--r-- | lib/ansible/plugins/shell/powershell.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/ansible/plugins/shell/powershell.py b/lib/ansible/plugins/shell/powershell.py index 77b588d8eb..4299043dca 100644 --- a/lib/ansible/plugins/shell/powershell.py +++ b/lib/ansible/plugins/shell/powershell.py @@ -1065,7 +1065,6 @@ Function Run($payload) { # NB: action popping handled inside subprocess wrapper $original_tmp = $env:TMP - $original_temp = $env:TEMP $remote_tmp = $payload["module_args"]["_ansible_remote_tmp"] $remote_tmp = [System.Environment]::ExpandEnvironmentVariables($remote_tmp) if ($null -eq $remote_tmp) { @@ -1075,10 +1074,8 @@ Function Run($payload) { # become process is run under a different console to the WinRM one so we # need to set the UTF-8 codepage again $env:TMP = $remote_tmp - $env:TEMP = $remote_tmp Add-Type -TypeDefinition $helper_def -Debug:$false $env:TMP = $original_tmp - $env:TEMP = $original_tmp $username = $payload.become_user $password = $payload.become_password |