Commit Graph

6944 Commits

Author SHA1 Message Date
Seth Vargo 88aa106327 Fix up i18n missing translation 2014-12-08 11:35:11 -08:00
Seth Vargo 411c7d6f75 Define finalize! and __compiled_pushes for Push config 2014-12-08 11:35:11 -08:00
Seth Vargo 8e2f18761f Remove unused methods from vagrantfile.rb 2014-12-08 11:35:10 -08:00
Seth Vargo e5b10aa86b Collect push_configs in the Plugin Manager 2014-12-08 11:35:10 -08:00
Seth Vargo 413565f961 Simplify the API for Environment#push
The API has a precondition that `name` is not nil
2014-12-08 11:35:10 -08:00
Seth Vargo 3871154a74 Ignore options that come back from the plugin for now 2014-12-08 11:35:10 -08:00
Seth Vargo 988518a6ba Make Environment#pushes its own method 2014-12-08 11:35:10 -08:00
Seth Vargo 190da26404 Push does not have access to @machine 2014-12-08 11:35:10 -08:00
Seth Vargo 03b8105571 Super primitive implementation of Environment#push 2014-12-08 11:35:10 -08:00
Seth Vargo b6c5ca6b7a Add Push command and tests 2014-12-08 11:35:10 -08:00
Seth Vargo d79a0d52dd Do not use Enumerable in Registry
Calling methods like #first in Registry is misleading because it returns
a different result than registry.get(registry.keys.first).
2014-12-08 11:35:10 -08:00
Seth Vargo c0b107ff69 Add Registry#empty? to check if a registry has any items 2014-12-08 11:35:10 -08:00
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
Gilles Cornu 0a64b0c4e1 Update CHANGELOG: fix docker agent forwarding
Ref GH-4905
2014-12-07 11:14:21 +01:00
Gilles Cornu 40a22ff99a providers/docker: fix support of agent forwarding 2014-12-07 11:02:50 +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
Ken Crowell 72afdce630 Issue #4895: Support grains config for salt 2014-12-02 18:01:09 -04: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
Dharma Bellamkonda 5ae5690d66 clarify documentation of docker.link() 2014-11-28 12:59:20 -07: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
Emilien Kenler 17673fafcd You need to press enter to migrate from 1.1 to 1.5 2014-11-18 11:05:59 +09:00
Seth Vargo d1691c21c7 Point to the product page for supported VMware versions 2014-11-16 14:35:20 -05:00
Jonathan Collins fdce74475c typo 2014-11-14 19:31:19 -08: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