Without this change, the JSON string generated from the `extra_vars` Ruby hash is passed without enclosing quotes and is then not parseable by the ansible-playbook command when exectuted in a usual shell context. In this changeset, the ansible (remote) unit test coverage is improved to cover both usage of `extra_vars` (ansible_local unit tests are still missing). Additional Notes: - Double quotes are favored to single quotes in order to allow usage of any character for the variable values. For this reason additional escaping is appended to JSON-inner double quotes and backslashes. - This problem was not affecting the `ansible` remote provisioner (which is running the ansible-playbook command via the childprocess Ruby library). But with this change, the `verbose` output will also now be correct for a copy-paste reuse. - After this change, all the "--extra-vars" arguments (also a var file passed with the @-syntax or anything coming via the `raw_arguments` option) are "blindly" and systematically enclosed in double quoted and double-escaped. This is not optimal and can potentially break with peculiar values (e.g. a double quote character (") cannot be used in a json value when using `raw_arguments`). That said, I think that the current solution is a reasonable trade-off, since the official `extra_vars` option should now be able to cover a great majority of use cases. Fix #6726 |
||
---|---|---|
.. | ||
commands | ||
communicators | ||
guests | ||
hosts | ||
kernel_v1 | ||
kernel_v2 | ||
providers | ||
provisioners | ||
pushes | ||
synced_folders | ||
README.md |
README.md
Vagrant Core Plugins
These are plugins that ship with Vagrant. Vagrant core uses its own plugin system to power a lot of the core pieces that ship with Vagrant. Each plugin will have its own README which explains its specific role.