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
c4f17852
Commit
c4f17852
authored
Sep 23, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use split_args instead of shlex to split include params
Fixes #8947
parent
4e9c061b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lib/ansible/playbook/__init__.py
+8
-4
No files found.
lib/ansible/playbook/__init__.py
View file @
c4f17852
...
...
@@ -21,6 +21,7 @@ import ansible.runner
from
ansible.utils.template
import
template
from
ansible
import
utils
from
ansible
import
errors
from
ansible.module_utils.splitter
import
split_args
,
unquote
import
ansible.callbacks
import
ansible.cache
import
os
...
...
@@ -209,12 +210,15 @@ class PlayBook(object):
name and returns the merged vars along with the path
'''
new_vars
=
existing_vars
.
copy
()
tokens
=
s
hlex
.
split
(
play_ds
.
get
(
'include'
,
''
))
tokens
=
s
plit_args
(
play_ds
.
get
(
'include'
,
''
))
for
t
in
tokens
[
1
:]:
(
k
,
v
)
=
t
.
split
(
"="
,
1
)
new_vars
[
k
]
=
template
(
basedir
,
v
,
new_vars
)
try
:
(
k
,
v
)
=
unquote
(
t
)
.
split
(
"="
,
1
)
new_vars
[
k
]
=
template
(
basedir
,
v
,
new_vars
)
except
ValueError
,
e
:
raise
errors
.
AnsibleError
(
'included playbook variables must be in the form k=v, got:
%
s'
%
t
)
return
(
new_vars
,
tokens
[
0
]
)
return
(
new_vars
,
unquote
(
tokens
[
0
])
)
# *****************************************************
...
...
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