1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #3089 from kentfrazier/unsafe-extra-vars-fix

Keep ansible-playbook from bombing without extra-vars
This commit is contained in:
Michael DeHaan 2013-06-01 06:06:00 -07:00
commit 9736ec03a9

View file

@ -98,7 +98,7 @@ def main(args):
if options.sudo_user or options.ask_sudo_pass:
options.sudo = True
options.sudo_user = options.sudo_user or C.DEFAULT_SUDO_USER
if options.extra_vars[0] in '[{':
if options.extra_vars and options.extra_vars[0] in '[{':
extra_vars = utils.json_loads(options.extra_vars)
else:
extra_vars = utils.parse_kv(options.extra_vars)