vagrant/website/source/docs
Gilles Cornu 8834afbd8e
provisioners/ansible(both): Add compatibility mode
With this change, it is now possible to get rid of many deprecation
messages successively introduced in Ansible 1.9, and 2.0. More
interesting, the generated inventory will contain the recommended
variable names (e.g. `ansible_host` instead of `ansible_ssh_host`)
when the compatibility mode is set to '2.0'.

Details:

- Add `compatibility_mode` option to control the Ansible parameters
  format to be used. The value corresponds to the minimal version
  supported. For the moment, possible values are '1.8' (corresponding to
  Vagrant's former behaviour) or '2.0'.
  Note that a dynamic inventory generated in compatibility mode '2.0'
  is not supported by Ansible 1.x. On the other hand, Ansible 2.x so far
  supports inventory format generated by the compatibility mode '1.8'.

- Add compatibility mode auto-detection, based on the available Ansible
  version. This is the default behaviour in order to bring a maximum of
  user friendliness. The drawback of this approach is to let potential
  compatibility breaking risks, for `ansible` provisioner setups that
  already integrate Ansible 2.x **AND** rely on the existence of
  the generated `_ssh` variable names. Thanks to the vagrant warnings
  (and its release notes), I argue that it is worth to offer
  auto-detection by default, which offers a sweet transition to most
  users.

- Add `become`, `become_user` and `ask_become_pass` options and their
  backwards compatible aliases. The legacy options are now deprecated.

Note that we intentionally didn't provide a '1.9' compatibility mode,
as it would add extra-complexity for practically no added-value.
To my knowledge, the Ansible 2.x series haven't introduced yet any major
changes or deprecations that would motivate to introduce a higher
version compatibility mode (to be confirmed/verified).

Resolve GH-6570

Still Pending:

- Optimization: Reduce the number of `ansible` command executions.
  Currently two exec calls will be performed when the compatibility
  mode auto-detection is enabled (i.e. by default). We could make the
  provisioner a little bit smarter to only execute `ansible` only once
  in any situation (by combining "presence" and "version" checks).

- User-friendliness: Add better validator on `compatibility_mode`
  option, and shows a warning or an error instead of the silent
  fallback on the auto-detection modus.

- Test coverage: All the added behaviours are not fully covered yet.
2017-09-06 17:12:22 +02:00
..
boxes Fix removed links and atlas references 2017-06-29 08:46:31 -07:00
cli Fix rsync-auto typo 2017-07-03 15:22:32 -07:00
docker Support modifications of composition outside services 2017-05-12 15:09:30 -07:00
hyperv Convert atlas references to vagrant cloud 2017-06-23 10:01:51 -07:00
installation Docs: fix path of Vagrant location for OSX 2017-07-08 17:03:06 +02:00
multi-machine Rebrand to match HashiCorp styles 2017-03-27 21:24:57 -04:00
networking Fix minor typo in website documentation 2017-07-20 12:51:46 -04:00
other Remove extra shell prompt 2017-08-16 01:12:28 -04:00
plugins Update plugin docs. Remove bundler instructions from source install instructions. 2016-11-22 16:49:45 -08:00
providers Tabs to spaces 2016-01-19 14:54:13 -05:00
provisioning provisioners/ansible(both): Add compatibility mode 2017-09-06 17:12:22 +02:00
push Convert atlas references to vagrant cloud 2017-06-23 10:01:51 -07:00
share Convert atlas references to vagrant cloud 2017-06-23 10:01:51 -07:00
synced-folders update per review 2017-07-20 22:37:48 +02:00
vagrant-cloud website: Fix mailto link 2017-08-16 17:21:56 -04:00
vagrantfile (#8697) Introduce extra_args setting for ssh configs 2017-08-17 09:02:20 -07:00
virtualbox Use Gem::Version class to ensure expected comparison results 2017-02-01 13:22:23 -08:00
vmware Merge pull request #8368 from chrisroberts/vmware/whitelist-doc 2017-03-28 15:23:24 -07:00
boxes.html.md Convert atlas references to vagrant cloud 2017-06-23 10:01:51 -07:00
index.html.md Rebrand to match HashiCorp styles 2017-03-27 21:24:57 -04:00