Commit 9736ec03 by Michael DeHaan

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

Keep ansible-playbook from bombing without extra-vars
parents 9122efb2 3316b870
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment