mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #266 from RWJMurphy/devel
[devel] ansible-playbook hangs if not passed --extra-vars
This commit is contained in:
commit
bee0e8db5b
1 changed files with 6 additions and 5 deletions
|
@ -267,11 +267,12 @@ def parse_yaml_from_file(path):
|
|||
def parse_kv(args):
|
||||
''' convert a string of key/value items to a dict '''
|
||||
options = {}
|
||||
vargs = shlex.split(args, posix=True)
|
||||
for x in vargs:
|
||||
if x.find("=") != -1:
|
||||
k, v = x.split("=")
|
||||
options[k]=v
|
||||
if not args is None:
|
||||
vargs = shlex.split(args, posix=True)
|
||||
for x in vargs:
|
||||
if x.find("=") != -1:
|
||||
k, v = x.split("=")
|
||||
options[k]=v
|
||||
return options
|
||||
|
||||
class SortedOptParser(optparse.OptionParser):
|
||||
|
|
Loading…
Reference in a new issue