From fbba92b61e197864f02250fc0da0db51e7a61cb2 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 31 May 2013 16:07:40 -0400 Subject: [PATCH] Add an example of JSON extra variables on the command line. --- docsite/latest/rst/playbooks2.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docsite/latest/rst/playbooks2.rst b/docsite/latest/rst/playbooks2.rst index be5f7fdb9d..326026fefb 100644 --- a/docsite/latest/rst/playbooks2.rst +++ b/docsite/latest/rst/playbooks2.rst @@ -258,6 +258,13 @@ Example:: ansible-playbook release.yml --extra-vars "hosts=vipers user=starbuck" +As of Ansible 1.2, you can also pass in extra vars as quoted JSON, like so:: + + --extra-vars "{'pacman':'mrs','ghosts':['inky','pinky','clyde','sue']}" + +The key=value form is obviously simpler, but it's there if you need it! + + Conditional Execution `````````````````````