Commit Graph

1265 Commits

Author SHA1 Message Date
Gilles Cornu 9493901e0c
provisioners/ansible: Add example of `host_vars` values that include quotes
Motivated by the support effort on GH-8158 ;-)
2016-12-28 23:23:43 +01:00
Chris Roberts cf93efca2d Update tests for new information and cleaning method 2016-11-16 13:27:34 -08:00
Gilles Cornu 8caed8ea16 Merge pull request #7918 from mitchellh/gildegoma/fix-7195
Add `config_file` option to both Ansible provisioners
2016-11-15 08:29:30 +01:00
Chris Roberts ac74774fcb Merge pull request #8000 from chrisroberts/plugins/updates
Plugin handling updates
2016-11-14 13:24:52 -08:00
Chris Roberts 0f720a4386 Merge pull request #7985 from chrisroberts/shell-provisioner/checksum
Add md5 and sha1 checksum support to Downloader.
2016-11-14 13:19:22 -08:00
Chris Roberts 214f3ccee7 Merge pull request #7989 from chrisroberts/fix/more-networking-sorting
Only match interfaces without special characters
2016-11-14 13:17:19 -08:00
Chris Roberts beffa70941 Downloader checksum output information and digester usage
Add more output information around type of checksum being validated.
Use builtin Digest#file to read target file for generation of hexdigest.
2016-11-14 10:22:25 -08:00
Gilles Cornu 1de9f2228d
provisioners/ansible: Fix a mistake in a unit test 2016-11-13 21:00:58 +01:00
Chris Roberts 3afa7a3193 Update specs to match updated behavior for local install 2016-11-11 15:21:30 -08:00
Chris Roberts 5482692127 guests/linux: Only match interfaces without special characters 2016-11-10 07:19:26 -08:00
Chris Roberts f6a0861c40 Add stub test for salt provisioner 2016-11-09 16:29:23 -08:00
Chris Roberts 2d6071a55b Merge pull request #7793 from chrisroberts/enhancement/bundler-less
[core] Remove bundler usage for plugin management
2016-11-09 16:17:47 -08:00
Chris Roberts 2dcb47410f Merge pull request #7976 from chrisroberts/ssh/shell-compat
Allow custom generation of environment variable exports
2016-11-09 16:14:33 -08:00
Chris Roberts 8d2d324b13 Merge pull request #7980 from chrisroberts/synced-folder/auto-mount
Named synced folders
2016-11-09 16:12:03 -08:00
Chris Roberts da45ca707c Add md5 and sha1 checksum support to Downloader.
Allows checksum validation on downloaded files via Util::Downloader
using MD5 and/or SHA1 checksums. This also integrates checksum validation
support with the shell provisioner for downloaded remote files.
2016-11-09 16:05:39 -08:00
Björn Brala cdc5018b59 Add tests for prune command 2016-11-09 09:24:41 +01:00
Chris Roberts d528902edc Make guestpath an optional parameter for synced_folders 2016-11-08 15:33:30 -08:00
Chris Roberts dfc5e0d9a0 communicator/ssh: Allow custom generation of environment variable exports 2016-11-08 09:50:39 -08:00
Chris Roberts 1f5dd35d16 Remove bundler where no longer required 2016-11-07 20:00:38 -08:00
Chris Roberts 36d21f3c3f Add testing for plugin expunge command 2016-11-07 19:26:33 -08:00
Chris Roberts dbbd2d8e36 Remove deprecated methods and update tests. 2016-11-07 18:48:14 -08:00
Chris Roberts d1a778dbfb Include error handling when subprocess commands fail 2016-10-31 07:42:30 -07:00
Chris Roberts d89924afef Include test coverage on linux host nfs plugin 2016-10-29 17:54:41 -07:00
Chris Roberts dd7294b021 Merge pull request #7928 from chrisroberts/rsync/exclude-paths
synced_folders/rsync: Quote exclude paths
2016-10-26 07:16:15 -07:00
Chris Roberts be3fa85853 Merge pull request #7921 from chrisroberts/fix/key-fixups
Remove `set -e` usage for better shell compatibility
2016-10-25 14:43:04 -07:00
Chris Roberts 365b98fee6 Merge pull request #7926 from chrisroberts/networking/rhel
guests/redhat: Force NetworkManager to reload device configurations
2016-10-25 14:41:07 -07:00
Chris Roberts 05c5aab92a synced_folders/rsync: Escape exclude paths 2016-10-25 13:59:03 -07:00
Chris Roberts c39b3fbb76 guests/openbsd: Check package installation after installing package
The `pkg_add` command will return `0` when a package requested for
installation is not found. This adds a validation check to ensure
the rsync package is actually installed on the guest.
2016-10-25 12:16:52 -07:00
Chris Roberts 67f3c8b48c guests/redhat: Force NetworkManager to reload device configurations
When configuring network devices force NetworkManager to reload new
configuration files as they appear. This prevents NetworkManager from
attempting to continue managing devices on initial start up.
2016-10-25 07:45:38 -07:00
Chris Roberts fb4e4320b2 Remove `set -e` usage for better shell compatibility 2016-10-24 10:30:08 -07:00
Gilles Cornu a842abbc38
provisioners/ansible(both): Add config_file option
With this new option defined, the `ansible-galaxy` and
`ansible-playbook` commands generated by the Ansible provisioners will
be executed with the ANSIBLE_CONFIG environment variable set
accordingly.

Resolve GH-7195

This commit also fix the following open issues:
- Implement the pending RSpec examples about path existence checks
  performed by the ansible (remote) provisioner.
- In verbose mode, the ansible remote provisioner now correctly displays
  the Ansible Galaxy parameters ("role_file" and "roles_path") with
  single quotes (which is safer for potential copy-paste usage).

Additional Notes:
- Test coverage for `ansible_local` provisioner is still not
  implemented. See GH-6633.
- Test coverage for galaxy from host is not implemented yet (due to
  general issue with mocking both command executions, see
  https://github.com/mitchellh/vagrant/pull/6529#r45278451
2016-10-22 01:09:12 +02:00
Gilles Cornu b1ddc98e17
Merge pull request #7881 (Add playbook_command option)
Note that error messages were not adapted, and only mention
a generic "Ansible Software" when executed commands are failing.
We assume that people using the `playbook_command` option are
advanced users that will know all the components to be considered.
2016-10-10 23:18:24 +02:00
Chris Roberts 07ce1c6930 Merge pull request #7866 from chrisroberts/guest-linux/network-interfaces-sorting
guests/linux: Update network interface sorting implementation
2016-10-10 10:59:52 -07:00
Chris Roberts 7eb1091a71 Merge pull request #7874 from chrisroberts/enhancement/cast-box-version
config/vm: cast box version to string before string operations
2016-10-10 10:57:53 -07:00
Chris Roberts a8970281ce guests/linux: Properly sort interface name types
Add failing networking interface list sorting test with example
provided by #7883. Update sorting logic to properly handle different
types and differing array lengths.

Fixes #7883
2016-10-10 10:22:19 -07:00
Daniel Gonzalez 79a3cb8a14 Add unit test and documentation for playbook_command option 2016-10-10 16:56:36 +02:00
Daniel Gonzalez 58f2b0c8c7 Make ansible-playbook command configurable
The ansible-playbook command is currently hardcoded for the ansible and
ansible_local provisioners. This patch adds the config option
playbook_command to allow the user to change the command.
2016-10-09 20:48:50 +02:00
Chris Roberts 28f2ed56cf Merge pull request #7756 from alexoj/master
Fix Vagrant not prioritizing configured providers correctly
2016-10-07 17:14:54 -07:00
Mark Peek 4bf32e3f6d Fix typo (netmast => netmask) for Photon guest #7808 2016-10-07 12:32:21 -07:00
Chris Roberts 26b3a303d2 config/vm: cast box version to string before string operations 2016-10-06 16:16:59 -07:00
Chris Roberts e2b18fc65d guests/linux: Update network interface sorting implementation
Always pull ordered ethernet devices to the head of the list. Ensure
aliases are not included.
2016-10-04 17:25:00 -07:00
Chris Roberts f72cd286c1 Merge pull request #7831 from mwrock/nano
Use the cmd shell to check winrm availability to fix `vagrant up --no-provision` on nano
2016-09-30 16:16:42 -07:00
Chris Roberts 2e6b23c8fd Merge pull request #7848 from chrisroberts/fix/eth-first-predictable
guests/linux: Place ethernet devices at start of device list
2016-09-30 14:50:08 -07:00
Chris Roberts 0300df09fb guests/linux: Update constant name, freeze constant values 2016-09-30 12:11:54 -07:00
Chris Roberts 6e6b35f1c5 Merge pull request #7712 from mwrock/executor
fix #7489 preventing winrm connection leakage
2016-09-30 09:10:42 -07:00
Chris Roberts 9f468d2626 guests/linux: Place ethernet devices at start of device list 2016-09-29 15:33:29 -07:00
Chris Roberts a8cddf399d Merge pull request #7778 from justjake/subprocess-closable-stdin
Allow closing a Vagrant::Util::Subprocess's STDIN
2016-09-28 08:22:28 -07:00
Matt Wrock c5e1a6d8c0 use the cmd shell to check winrm availability 2016-09-26 14:07:11 -07:00
Gilles Cornu e8cf9bb168
provisioners/ansible: review pull request #7752
- Honour `ssh.proxy_command` setting (even when the Docker provider is
  used via a proxy host). Silly configurations may lead to silly
  behaviors, but let's apply the settings...
- Remove condition on `provider_config.connect_via_ssh`, which is
  a provider specific parameter (from vagrant-libvirt provider).
- Add a simple unit test
2016-09-21 23:40:20 +02:00
Alejandro Ojeda 0be221fbea Add test for provider priority fix
This commit adds tests for possible future regressions for the bug fixed
in the commit: "Fix Vagrant not prioritizing configured providers
correctly".

Two very similar tests were added because whether the bug manifests
or not depends on the order in which the provider dictionary keys
are iterated, which is specific to the dictionary implementation.
2016-09-18 04:04:32 +02:00