--extra-vars option for ansible-playbook

Conflicts:

	lib/ansible/playbook.py

Removed unneccessary shlex and replaced with basic split, some repurcussions in runner
that can be eliminated once we consistently pass args as a string (soon).
This commit is contained in:
Michael DeHaan 2012-03-30 22:28:10 -04:00
parent 6db87a5018
commit f11de2f5c9
4 changed files with 51 additions and 15 deletions

View file

@ -271,7 +271,13 @@ def unquote_string(string):
def parse_kv(args, unquote=True):
''' convert a string of key/value items to a dict '''
options = {}
for x in args:
# FIXME: this should be mostly unneccessary once we convert
# things to stop parsing/unparsing
if type(args) == list:
vargs = args
else:
vargs = shlex.split(args, posix=True)
for x in vargs:
if x.find("=") != -1:
k, v = x.split("=")
if unquote: