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
1ed1af6c
Commit
1ed1af6c
authored
Feb 02, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make extra_vars into unicode string type early
Fixes v2 for #10106
parent
6d788629
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
v2/bin/ansible-playbook
+4
-2
No files found.
v2/bin/ansible-playbook
View file @
1ed1af6c
...
...
@@ -13,6 +13,7 @@ from ansible.parsing.splitter import parse_kv
from
ansible.playbook
import
Playbook
from
ansible.playbook.task
import
Task
from
ansible.utils.cli
import
base_parser
from
ansible.utils.unicode
import
to_unicode
from
ansible.utils.vars
import
combine_vars
from
ansible.vars
import
VariableManager
...
...
@@ -105,10 +106,11 @@ def main(args):
extra_vars
=
{}
for
extra_vars_opt
in
options
.
extra_vars
:
if
extra_vars_opt
.
startswith
(
"@"
):
extra_vars_opt
=
to_unicode
(
extra_vars_opt
)
if
extra_vars_opt
.
startswith
(
u"@"
):
# Argument is a YAML file (JSON is a subset of YAML)
data
=
loader
.
load_from_file
(
extra_vars_opt
[
1
:])
elif
extra_vars_opt
and
extra_vars_opt
[
0
]
in
'[{'
:
elif
extra_vars_opt
and
extra_vars_opt
[
0
]
in
u
'[{'
:
# Arguments as YAML
data
=
loader
.
load
(
extra_vars_opt
)
else
:
...
...
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