Commit Graph

10672 Commits

Author SHA1 Message Date
Björn Brala 0f743d0731 Auto stop action is configured through auto start action. 2017-09-26 16:03:35 +02:00
Bryce Shurts 0eaf691ea0 Adding check for APIPA in winrm helper to fix #8996 2017-09-25 16:31:37 -05:00
Benjamin Schiborr c30c00508c provisioners/salt: #8991: Fixes timeout issue in salt bootstrapping for windows
Fixes #8991.

1. When remote executing scripts one should always call powershell with
1a. "-NonInteractive", in order to prevent interactive prompts from leading to an endless waiting time for the script to return
1b. "-NoProfile", in order to prevent the loading of unknown custom profiles before execution of the script which could have unintended side effects
2. During my tests I constantly ran into 408 timeouts when downloading the salt binaries. I've prevented that by adding a simple retry mechanism and an error exit in case of multiple failures. Without this change the bootstrap script never returned (and neither did vagrant up)
2017-09-22 18:08:30 -07:00
Chris Roberts 2355936291 Update documentation link 2017-09-22 16:31:06 -07:00
Chris Roberts 901a166ebe Merge pull request #8958 from krig/suse-commands-2
Update sudoers file for SUSE
2017-09-22 10:53:14 -07:00
Chris Roberts c0d3ac2f47 Merge pull request #8985 from jdanford/fix-stray-backquote-in-docs
Fix stray backquote in "Vagrantfile / SSH Settings" section of docs
2017-09-22 10:52:07 -07:00
Jordan Danford de16f56b45 Fix stray backquote in "Vagrantfile / SSH Settings" section of docs 2017-09-20 09:37:31 -07:00
Mikhail Bulash 508d94d466 provisioners/shell: Use ui.detail for displaying output
Output format of ui.info method (bold text) makes reading long script outputs really heavy on the eyes. ui.detail is a better match for this type of output.
2017-09-18 17:55:07 +03:00
Brian Cain 3c9e1c9d84 (#8954) Split out cygwin path and ensure bin exists
This commit splits out the msys2 and cygwin path functions for
expanding a path with the cygpath tool. It also ensures that the tool
itself exists when the Which class is called so that it doesn't attempt
to escape slashes on nil.
2017-09-15 10:33:04 -07:00
Jehiah Czebotar 7d73af5637
Virtualbox 5.2 support 2017-09-14 15:07:11 -04:00
Chris Roberts 7bb3bd702e Update links 2017-09-13 10:18:17 -07:00
Jonathan LaBroad 6f53c3991c Merge remote-tracking branch 'upstream/master' 2017-09-11 09:15:22 -04:00
Kristoffer Grönlund 6f0b72ea23 Update sudoers file for SUSE 2017-09-09 11:52:19 +02:00
Chris Roberts a124f66358 Update version for dev 2017-09-07 07:49:11 -07:00
Chris Roberts 8610578d8d Update vagrant website version to 2.0.0 2017-09-07 07:46:51 -07:00
Chris Roberts d1cf0f77e7 Release v2.0.0 2017-09-07 05:43:26 -07:00
Chris Roberts 27ca217eae Update CHANGELOG 2017-09-06 17:50:39 -07:00
Chris Roberts 2451c859e8 Merge pull request #8746 from mastersin/alt
Add ALT Linux platforms guest detection and network configuration support (#8745)
2017-09-06 17:49:38 -07:00
Chris Roberts 1964e401d2 Update CHANGELOG 2017-09-06 17:02:37 -07:00
Chris Roberts d7b64dce80 Merge pull request #8938 from chrisroberts/update/host-systemd
Update linux host NFS capability
2017-09-06 16:57:27 -07:00
Brian Cain 15405cfa9b Update CHANGELOG 2017-09-06 14:52:32 -07:00
Brian Cain b2f34a6ea9 Merge pull request #8951 from briancain/RETRYABLE-COMMANDS
Improving resilience of some VirtualBox commands fixup
2017-09-06 14:51:02 -07:00
Chris Roberts 90d1911367 Update CHANGELOG 2017-09-06 13:31:12 -07:00
Chris Roberts 34addec796 Merge pull request #8913 from mitchellh/gildegoma/6570-ansible-compatibility-mode
Ansible: Add "compatibility_mode" and "*become*" common options; Move "version" to common options
2017-09-06 13:18:08 -07:00
Brian Cain 0363bd9c01 Update CHANGELOG 2017-09-06 13:05:49 -07:00
Brian Cain 4e7bd96bb0 Merge pull request #8950 from terceiro/fix-permissions
plugins/guests/kali: fix file permissions
2017-09-06 13:04:29 -07:00
Gilles Cornu ac75e409a3
provisioners/ansible(both): Quote host_vars if needed
This patch is based on @subimage's inputs in the related GitHub issue.
Thanks again!

Fix #8597
2017-09-06 21:22:41 +02:00
Brian Cain 9b872c9e7e Cleanup virtualbox retryable commands
Reverting the changes done in 7d2f7dab97
because they don't work and or update vagrant to invoke running the
vbox cli tool for every single forwarded port instead of forwarding them
all in one command.
2017-09-06 11:14:11 -07:00
Samuel Clark 2e775e8101 8468 - make more virtualbox commands retryable
Issue: https://github.com/mitchellh/vagrant/issues/8468

A lot of vboxmanage commands are flakey and frequently cause
bringing multiple machines up at once to fail, especially when
the host system is under heavy load. Most commands are also safe
to retry and just result in a no-op, so we can simply add
'retryable' to a lot of existing calls. For the others we need to
do a little bit of cleanup or reevaluate the parameters before
trying again.
2017-09-06 11:14:11 -07:00
nico.vanelslande 9aecd5e1a4 Improved resilience of the VirtualBox driver delete_unused_host_only_networks function by
ignoring VMs that may have been deleted between the calls to
'vboxmanage list vms' and 'vboxmanage showvminfo'
2017-09-06 11:13:14 -07:00
nico.vanelslande 56c8b9269a Improved resilience of the VirtualBox driver read_used_ports function by
ignoring VMs that may have been deleted between the calls to
'vboxmanage list vms' and 'vboxmanage showvminfo'
2017-09-06 11:13:14 -07:00
Chris Roberts fcd1aee9bb Update linux host NFS capability
Add support for systemd detection and using correct method
for starting/checking host nfs service.
2017-09-06 09:54:06 -07:00
Brian Cain 6673c14916 Update CHANGELOG 2017-09-06 08:36:02 -07:00
Brian Cain f1eddace18 Merge pull request #8945 from briancain/4666/master/dupe-nfs-export-linux
Remove duplicate export folders before writing /etc/exports
2017-09-06 08:34:46 -07:00
Antonio Terceiro acda71edd9 plugins/guests/kali: fix file permissions
Those Ruby files are not standalone scripts, so there is no point in
having them being executable.
2017-09-06 12:21:23 -03:00
Gilles Cornu a0a09c6095
minor: Fix a typo in a code comment
[ci skip]
2017-09-06 17:12:51 +02:00
Gilles Cornu 4dc3e59b08
provisioners/ansible(both): Review of PR #8913
- Keep the Programming Errors with corresponding Exception class and
  en.yml message template. Fix the alphabetical order in errors.rb by
  the way.
- Fix English wording in the documentation and en.yml messages
- Use StandardError for unknown error rescuing.

Thanks @chrisroberts!
2017-09-06 17:12:50 +02:00
Gilles Cornu 6bc0c85e90
provisioners/ansible_local: Optimize SSH commands
With this change, the same remote command is used to:
- verify that ansible is available
- gather the ansible version details
2017-09-06 17:12:46 +02:00
Gilles Cornu 9996ed6259
provisioners/ansible_local: Fix an obsolete comment
[ci skip]
2017-09-06 17:12:44 +02:00
Gilles Cornu dec09f350b
provisioners/ansible: Fix wording and link in i18n en.yml messages 2017-09-06 17:12:42 +02:00
Gilles Cornu dc3b6341e2
provisioners/ansible: Check compatibility conflicts
Vagrant will verify that the current Ansible version does support the
requested compatibility mode (only applicable if not "auto", of course).

As mentioned in the documentation, there is no sanity checks between
`version` option and `compatibility_mode` option.

With this change, the host-based provisioner is also improved to
execute only once the "ansible" command (and store the gathered
information for multiple usages like version requirement and
compatibility checks). On the other hand, the guest-based provisioner
can still potentially execute "ansible" twice (once in the
AnsibleInstalled cap, and via "gather_ansible_version" function via
Base::set_compatibility_mode).
2017-09-06 17:12:40 +02:00
Gilles Cornu 36616fb208
provisioners/ansible: Add @control_machine instance variable
This minor addition will be used for upcoming shared code in base
superclass and avoid "guest"/"host" repetitions.
2017-09-06 17:12:39 +02:00
Gilles Cornu 270618284c
docs/ansible: Fix an internal hyperlink
Fixing a typo made in 073898046542323eb11c2e129f37fa558ae201e1,
after getting the confirmation that all the Vagrant docs will continue
to use full path for internal links (for the moment).

[ci skip]
2017-09-06 17:12:39 +02:00
Gilles Cornu 71dd393134
unit/tests: Remove a TODO comment
This was pushed by accident in 073898046542323eb11c2e129f37fa558ae201e1.
2017-09-06 17:12:37 +02:00
Gilles Cornu 8c0df3d046
provisioners/ansible: Move `version` to common options
Before this change, only the ansible_local provisioner supported this
option (for ansible version requirement, and pip installation). Now, the
ansible host-based provisioner can also require a exact ansible version.

Resolve #8914

Note: this has been added as part of #6570 resolution, since the
introduction of the `compatibility_mode` auto-detection made both
provisioners made capable to detect ansible version.

Pending: optimize the code to avoid duplicated executions of "ansible
--version" command.
2017-09-06 17:12:35 +02:00
Gilles Cornu 15e74e264d
provisioners/ansible: Fix test stubs
Make the stubbed valid and invalid Ansible versions closer to the real
"ansible --version" stdout output.
2017-09-06 17:12:33 +02:00
Gilles Cornu a327e34861
provisioners/ansible: Validate compatibility_mode
- Use `'auto'` instead of `nil` for the auto-detection mode
- Add strict validation and related error message
2017-09-06 17:12:32 +02:00
Gilles Cornu e2621a42fc
docs/ansible: Align the "warn/info" notices style
Motivated by the 4d546a58e1243168f58e20ca53cab71b31e44ae9 changes.
2017-09-06 17:12:29 +02:00
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
Gilles Cornu e09848ca59
provisioners/ansible_local: Shellescape extra-vars
Fix #7735

Further work for proper shell-escaping of other ansible-playbook and
ansible-galaxy command line arguments will be addressed via #8949.
2017-09-06 16:30:40 +02:00