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
247322bb
Commit
247322bb
authored
Jul 08, 2013
by
Stoned Elipot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Jinja2 filter 'quote' to quote string for shell usage
parent
b2d881a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
lib/ansible/runner/filter_plugins/core.py
+8
-0
No files found.
lib/ansible/runner/filter_plugins/core.py
View file @
247322bb
...
...
@@ -20,6 +20,7 @@ import json
import
os.path
import
yaml
import
types
import
pipes
from
ansible
import
errors
def
to_nice_yaml
(
*
a
,
**
kw
):
...
...
@@ -61,6 +62,10 @@ def bool(a):
else
:
return
False
def
quote
(
a
):
''' return its argument quoted for shell usage '''
return
pipes
.
quote
(
a
)
class
FilterModule
(
object
):
''' Ansible core jinja2 filters '''
...
...
@@ -93,5 +98,8 @@ class FilterModule(object):
# value as boolean
'bool'
:
bool
,
# quote string for shell usage
'quote'
:
quote
,
}
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