Skip to content

Commit 67ce743

Browse files
sivelacozine
authored andcommitted
Remove erroneous extra-vars example, and a few really old versionadded indicators. Fixes ansible#38415 (ansible#49955)
1 parent 16f48bb commit 67ce743

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

docs/docsite/rst/user_guide/playbooks_variables.rst

-24
Original file line numberDiff line numberDiff line change
@@ -962,31 +962,11 @@ key=value format::
962962
.. note:: Values passed in using the ``key=value`` syntax are interpreted as strings.
963963
Use the JSON format if you need to pass in anything that shouldn't be a string (Booleans, integers, floats, lists etc).
964964

965-
.. versionadded:: 1.2
966-
967965
JSON string format::
968966

969967
ansible-playbook release.yml --extra-vars '{"version":"1.23.45","other_variable":"foo"}'
970968
ansible-playbook arcade.yml --extra-vars '{"pacman":"mrs","ghosts":["inky","pinky","clyde","sue"]}'
971969

972-
.. versionadded:: 1.3
973-
974-
YAML string format::
975-
976-
ansible-playbook release.yml --extra-vars '
977-
version: "1.23.45"
978-
other_variable: foo'
979-
980-
ansible-playbook arcade.yml --extra-vars '
981-
pacman: mrs
982-
ghosts:
983-
- inky
984-
- pinky
985-
- clyde
986-
- sue'
987-
988-
.. versionadded:: 1.3
989-
990970
vars from a JSON or YAML file::
991971

992972
ansible-playbook release.yml --extra-vars "@some_file.json"
@@ -995,17 +975,13 @@ This is useful for, among other things, setting the hosts group or the user for
995975

996976
Escaping quotes and other special characters:
997977

998-
.. versionadded:: 1.2
999-
1000978
Ensure you're escaping quotes appropriately for both your markup (e.g. JSON), and for
1001979
the shell you're operating in.::
1002980

1003981
ansible-playbook arcade.yml --extra-vars "{\"name\":\"Conan O\'Brien\"}"
1004982
ansible-playbook arcade.yml --extra-vars '{"name":"Conan O'\\\''Brien"}'
1005983
ansible-playbook script.yml --extra-vars "{\"dialog\":\"He said \\\"I just can\'t get enough of those single and double-quotes"\!"\\\"\"}"
1006984

1007-
.. versionadded:: 1.3
1008-
1009985
In these cases, it's probably best to use a JSON or YAML file containing the variable
1010986
definitions.
1011987

0 commit comments

Comments
 (0)