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
c1fe0dd7
Commit
c1fe0dd7
authored
Mar 18, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quote long variables in playbooks when feeding them to the setup command
parent
5371a9e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
lib/ansible/playbook.py
+1
-1
test/TestPlayBook.py
+4
-0
test/playbook1.yml
+1
-1
No files found.
lib/ansible/playbook.py
View file @
c1fe0dd7
...
...
@@ -449,7 +449,7 @@ class PlayBook(object):
# magic in Runner()
push_var_str
=
''
for
(
k
,
v
)
in
vars
.
iteritems
():
push_var_str
+=
"
%
s=
%
s
"
%
(
k
,
v
)
push_var_str
+=
"
%
s=
\"
%
s
\"
"
%
(
k
,
v
)
# push any variables down to the system
setup_results
=
ansible
.
runner
.
Runner
(
...
...
test/TestPlayBook.py
View file @
c1fe0dd7
...
...
@@ -117,3 +117,7 @@ class TestRunner(unittest.TestCase):
print
utils
.
bigjson
(
actual
)
assert
cmp
(
expected
,
actual
)
==
0
,
"expected events match actual events"
# make sure the template module took options from the vars section
data
=
file
(
'/tmp/ansible_test_data_template.out'
)
.
read
()
assert
data
.
find
(
"ears"
)
!=
-
1
,
"template success"
test/playbook1.yml
View file @
c1fe0dd7
...
...
@@ -2,7 +2,7 @@
---
-
hosts
:
all
vars
:
answer
:
"
???
"
answer
:
"
Wuh,
I
think
so,
Brain,
but
if
we
didn't
have
ears,
we'd
look
like
weasels.
"
port
:
5150
tasks
:
...
...
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