mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
--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:
parent
6db87a5018
commit
f11de2f5c9
4 changed files with 51 additions and 15 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue