Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
74c43c94
Commit
74c43c94
authored
Jun 18, 2014
by
Chris Church
Committed by
Matt Martz
Jun 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow specifying remote powershell version via environment variable.
parent
51a50dee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lib/ansible/runner/shell_plugins/powershell.py
+6
-0
No files found.
lib/ansible/runner/shell_plugins/powershell.py
View file @
74c43c94
...
...
@@ -24,6 +24,12 @@ import time
_common_args
=
[
'PowerShell'
,
'-NoProfile'
,
'-NonInteractive'
]
# Primarily for testing, allow explicitly specifying PowerShell version via
# an environment variable.
_powershell_version
=
os
.
environ
.
get
(
'POWERSHELL_VERSION'
,
None
)
if
_powershell_version
:
_common_args
=
[
'PowerShell'
,
'-Version'
,
_powershell_version
]
+
_common_args
[
1
:]
def
_escape
(
value
,
include_vars
=
False
):
'''Return value escaped for use in PowerShell command.'''
# http://www.techotopia.com/index.php/Windows_PowerShell_1.0_String_Quoting_and_Escape_Sequences
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment