Commit Graph

6876 Commits

Author SHA1 Message Date
Seth Vargo 2b03838fba Make Registry enumerable
Registry already responds to #each, so including the Enumerable module
gives us nice methods like #select and #collect fo' free!
2014-12-08 11:35:10 -08:00
Seth Vargo bc4bbb9fc0 Add #length and #size methods to Registry 2014-12-08 11:35:10 -08:00
Seth Vargo 60a8472891 Use a pushes registry instead of data hash 2014-12-08 11:35:09 -08:00
Seth Vargo 0e824cc471 Rename file push to noop push 2014-12-08 11:35:09 -08:00
Seth Vargo 72affa0a10 Accept a list of options in #push signature 2014-12-08 11:35:09 -08:00
Seth Vargo 5b9240ad8a Add Push to the PLUGIN_COMPONENTS 2014-12-08 11:35:09 -08:00
Seth Vargo 87b4e1f2cc Accept an environment in the push config 2014-12-08 11:35:09 -08:00
Seth Vargo 8a7e546972 Add preliminary File pusher (incomplete) 2014-12-08 11:35:09 -08:00
Seth Vargo a93fff103f Add base skeleton for `vagrant push` 2014-12-08 11:35:09 -08:00
Gilles Cornu 3800103228 provisioners/ansible: improve comment wording
Get rid of the Joker, thanks to @maspwr :)
2014-12-07 22:34:19 +01:00
Seth Vargo abdf1fdd04 Merge pull request #4900 from jquast/patch-1
Avoid double-newlines in salt-call output
2014-12-04 12:36:18 -05:00
Jeff Quast c6cce57ff4 Avoid double-newlines in salt-call output
When using the salt provisioner with verbose=true, most lines read with an extra newline:
```
[INFO    ] Syncing modules for environment 'base'

[INFO    ] Loading cache from salt://_modules, for base)

```

because the line read has a newline, and emitting the log entry again includes an additional newline.
2014-12-03 21:48:30 -08:00
Seth Vargo ddf3435aee Merge pull request #4893 from mitchellh/sethvargo/revert_tmpdir_changes
Revert "Merge pull request #4861 from obfusk/fix-tmpdir-delete"
2014-12-02 12:36:05 -05:00
Seth Vargo 9242e39a23 Revert "Merge pull request #4861 from obfusk/fix-tmpdir-delete"
This reverts commit 00e388a897, reversing
changes made to d1691c21c7.
2014-12-02 12:32:31 -05:00
Paul Hinze b2fdd29580 Merge pull request #4882 from mitchellh/3083-handle-default-vbox-dhcp-server-collision
Fix out of the box DHCP support
2014-12-01 09:32:09 -06:00
Paul Hinze 25ff636ee2 providers/virtualbox: cleanup default vbox dhcp server
fixes #3083

Detect the presence of the default DHCP server that comes in a fresh
VirtualBox install and clean it up to prevent it from colliding with
Vagrant-managed network config.

In order to accomplish this, we:

 - add a `remove_dhcp_server` call to the virtualbox driver
 - fix dhcp options parsing to allow `:dhcp_{ip,lower,upper}`
   configuration options to make it through (so a user can override the
   removal behavior with some explicit configuration)
 - add the full `:network_name` to the details returned from
   `:read_dhcp_servers`, so we can have a durable value to pass to
   `:remove_dhcp_server`

Note that we do have to eat one more `VBoxManage list dhcpservers` for
each network interface to support this, but this seemed like a nominal
cost
2014-11-30 22:03:52 -06:00
Paul Hinze 24b6f21d1d providers/virtualbox: extract reading dhcpservers from hostonlyifs
This is just a refactor, no behavior change.

Instead of stitching together dhcpserver info in the structure returned
from `read_host_only_interfaces`, sprout a new driver method called
`read_dhcp_servers` to return that information separately.

This means that driver clients (well there's really only _one_ client in
`ProviderVirtualBox::Action::Network`) have to do a bit more work to get
interface and DHCP server information.

But this gives us (a) a cleaner and more consistent driver interface and
(b) groundwork for a fix for #3083, which will require interacting with
DHCP servers outside of the context of host-only interfaces.
2014-11-30 22:03:52 -06:00
Paul Hinze 703c1f153b providers/virtualbox: fix flaky test when rsync is not installed
test-only change

when rsync is not installed on the machine running the unit tests, the
prepare_nfs_settings tests end up calling the :nfs_installed capability
on the host, which fails on the fake host wired up in tests.

this adds some explicit stubbing to prevent the implicit assumption that
rsync is installed.
2014-11-30 22:03:27 -06:00
Gilles Cornu f96636587a provisioners/ansible: don't read/write known_hosts
Like Vagrant's default SSH behaviors (e.g ssh or ssh-config commands),
the Ansible provisioner should by default not modify or read the user
known host file (e.g. ~/.ssh/known_hosts).

Given that `UserKnownHostsFile=/dev/null` SSH option is usually combined
with `StrictHostKeyChecking=no`, it seems quite reasonable to bind the
activation/disactivation of both options to `host_key_checking`
provisioner attribute.

For the records, a discussion held in Ansible-Development mailing list
clearly confirmed that there is no short-term plan to adapt Ansible to
offer an extra option or change the behavior of
ANSIBLE_HOST_KEY_CHECKING. For this reason, the current implementation
seems reasonable and should be stable on the long run.

Close #3900

Related References:

- https://groups.google.com/forum/#!msg/ansible-devel/iuoZs1oImNs/6xrj5oa1CmoJ
- https://github.com/ansible/ansible/issues/9442
2014-11-30 09:55:48 +01:00
Gilles Cornu 178942cf27 provisioners/ansible: change arguments arrangement
- force `--connection=ssh` (any other modes like paramiko or smart are not
  supported)
- give the highest priority to `raw_arguments` for sake of simplicity (in
  usage, in code and in documentation)
- fix position of the `--limit` argument (the generated inventory could be
  shadowed by `raw_arguments`, while ansible.limit was able to override
  `raw_arguments`

ref #3396
2014-11-30 09:50:50 +01:00
Gilles Cornu 306c4f7eda provisioners/ansible: force --connection=ssh
When `--connection` argument is not specified, Ansible will use the
'smart' mode, which can either use `ssh` or `paramiko` transports,
depending of the version of OpenSSH available. If OpenSSH version is new
enough to support ControlPersist technology, `ssh` will be used.
See also http://docs.ansible.com/intro_configuration.html#transport.

In order to support some advanced features of Vagrant (e.g. multiple ssh
private key identities or ssh forwarding), the Ansible provisioner
already must force `ssh` connection mode.

Having to deal with the possible fallback to `paramiko` increase the
burden of special cases that Ansible provisioner must handle, without
any added value, as Vagrant is based on OpenSSH and its users are
usually using modern operating systems.

With this change, the Ansible provisioner will officially only support
`ssh`. It will still be possible to switch to another connection mode
via `raw_arguments`, but it will breach the "contract", and no
(community) support can be expected in such use case.

ref #3900, #3396
2014-11-30 09:50:50 +01:00
Gilles Cornu 1c884fa4e5 provisioners/ansible: Show Ansible command when VAGRANT_LOG=debug 2014-11-25 08:12:43 +01:00
Seth Vargo 00e388a897 Merge pull request #4861 from obfusk/fix-tmpdir-delete
fix broken tempdir removal
2014-11-24 11:16:11 -05:00
Felix C. Stegerman 023e4b8c23 force rm tempfiles (no rescue nil); use right var 2014-11-24 16:59:15 +01:00
Felix C. Stegerman aca273c996 fix broken tempdir removal 2014-11-24 02:26:54 +01:00
Seth Vargo d1691c21c7 Point to the product page for supported VMware versions 2014-11-16 14:35:20 -05:00
Seth Vargo 39ab4f520b Update CHANGELOG 2014-11-10 19:40:58 -05:00
Seth Vargo 1d23fb75a2 Merge pull request #4801 from mitchellh/sethvargo/with_clean_env
Add Env.with_clean_env for resetting the Ruby and Rubygems environment
2014-11-10 19:38:41 -05:00
Mitchell Hashimoto f8a2322459 core: only delete state if not created on initialize only
/cc @sethvargo
2014-11-10 16:29:19 -08:00
Seth Vargo 5b1211fc63 Merge pull request #4792 from mwrock/state_refresh_fix
fixes infinite loop in machine state call if provider calls machine.action
2014-11-10 12:24:24 -05:00
Seth Vargo f86189a2fe Add Env.with_clean_env for resetting the Ruby and Rubygems environment 2014-11-10 12:00:23 -05:00
Seth Vargo 1c06da04e6 Merge pull request #4761 from mitchellh/sethvargo/chef_omnibus
Automatically install Chef when provisioning with Chef
2014-11-10 11:59:27 -05:00
Seth Vargo 25ddb373d1 Add exec/ to .gitignore 2014-11-10 11:59:13 -05:00
Seth Vargo f37aecea99 Update CHANGELOG with auto-installing Chef 2014-11-07 15:56:22 -05:00
Seth Vargo 30dbedeea4 Update Vagrantfile to include Chef Apply and options for Chef install 2014-11-07 15:56:22 -05:00
Seth Vargo f232dc38c9 Automatically install Chef when provisioning with Chef 2014-11-07 15:56:22 -05:00
Seth Vargo b7c03ddbe2 Update config tests to reflect new structure 2014-11-07 15:56:21 -05:00
Seth Vargo a8fa4bccc7 Add Chef::Config#install and Chef::Config#version options 2014-11-07 15:56:21 -05:00
Seth Vargo 8f35ecaa6f Extract runner-specific Chef configs into their own subclass
This separates the truly basic pieces of Chef (like install url and
log_level) from the runner pieces of Chef (like provisioning_path). This
is necessary because the Chef Apply provisioner does not actually need
most of the Chef configuration options.
2014-11-07 15:56:21 -05:00
Matt Wrock dc628cd722 fixes infinite loop in machine state call if provider calls machine.action 2014-11-06 08:51:47 -08:00
Seth Vargo dc1b4ef9b8 Merge pull request #4790 from julienvey/patch-1
Fix typos in CONTRIBUTING.md
2014-11-06 09:33:12 -05:00
Julien Vey 35db398ba1 Fix typos in CONTRIBUTING.md 2014-11-06 14:43:11 +01:00
Seth Vargo d20dea0037 Merge pull request #4788 from kikitux/master
doc rsync - use sudo rsync for a restricted folder
2014-11-05 16:17:23 -05:00
Alvaro Miranda 808008953f doc rsync - suggest sudo for restricted folder 2014-11-05 12:45:28 -08:00
Alvaro Miranda f93ba01770 doc rsync - suggest sudo for restricted folder 2014-11-05 12:43:46 -08:00
Seth Vargo a5b576f0cd Merge pull request #4779 from mitchellh/sethvargo/upgrade_text
Explain that older Vagrant plugin licenses may not work with new VMware
2014-11-04 11:36:40 -05:00
Seth Vargo 8f59f89a2e Explain that older Vagrant plugin licenses may not work with new VMware
This is the result of an unhappy customer who raised a very valid point. If you
are not on the Vagrant mailing list, you would be unaware that upgrading VMware
would cause your plugin to stop functioning.

While this does not solve the problem of dispersing that information, it helps
clarify that plugin version support is for the latest version of the Vagrant
plugin and does not extend to previous ones.
2014-11-04 10:46:54 -05:00
Seth Vargo 1464a63928 Merge pull request #4777 from voxik/remove-useless-expect-with
Remove useless expect_with
2014-11-04 09:29:29 -05:00
Vít Ondruch 552889f433 Neither Mocha is required. 2014-11-04 11:48:21 +01:00
Vít Ondruch 81d3668ea1 contest is not required anymore. 2014-11-04 10:56:24 +01:00