5519 Commits

Author SHA1 Message Date
Gilles Cornu
40a22ff99a providers/docker: fix support of agent forwarding 2014-12-07 11:02:50 +01: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
Chad Maloney
a2778c0a6b Merge branch 'master' into GH4201-ShowRSyncOutput 2014-12-03 13:11:56 -06:00
Ken Crowell
72afdce630 Issue #4895: Support grains config for salt 2014-12-02 18:01:09 -04: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
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
Chad Maloney
1ed31afeba GH-4201: Cleaned up some leftover junk I missed removing 2014-11-25 14:39:56 -06:00
Chad Maloney
cf784d5d3c GH-4201: Split process output by line so prefix shows on each line. Also fixed localization reference. 2014-11-25 14:37:59 -06:00
Chad Maloney
5de3f30bb0 GH-4201: Added rsync__showoutput to display rsync output to console 2014-11-25 12:38:41 -06:00
Gilles Cornu
1c884fa4e5 provisioners/ansible: Show Ansible command when VAGRANT_LOG=debug 2014-11-25 08:12:43 +01:00
Daniel Klockenkämper
8066c38881 Update configure_networks.rb for funtoo
fixed name of temporary network configuration file to work with the further process of copying file to configuration directory
2014-11-11 15:12:48 +01: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
f232dc38c9 Automatically install Chef when provisioning with Chef 2014-11-07 15:56:22 -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
Chris Jones
b19abebdf0 Grammar fix to the network interface bridge question 2014-10-31 15:16:02 -04:00
Seth Vargo
59eb0ad2e8 Add Chef Apply provisioner 2014-10-30 15:32:15 -04:00
Seth Vargo
514101816b Fix alignment in the Chef Client config 2014-10-30 15:32:10 -04:00
Seth Vargo
af9177550a Properly handle empty/nil values in Chef Solo config 2014-10-30 13:43:26 -04:00
Seth Vargo
7e71d72db8 Check for empty chef_server_url and validation_key_path 2014-10-30 13:43:25 -04:00
Seth Vargo
721edf70b9 Make Chef Zero lowercase in validation (conforms to other keys) 2014-10-30 13:43:25 -04:00
Seth Vargo
1169c80a72 Use require_relative for faster loading
require_relative is an order of magnitude faster on Windows
2014-10-30 13:43:25 -04:00
Teemu Matilainen
dec5dcdda3 provisioners/chef: Add chef_zero provisioner
Add Chef Zero provisioner using `local_mode` configuration for
chef-solo/chef-client.
2014-10-30 13:43:24 -04:00
Rob Kinyon
14b84a4a76 Added a --plugin-clean-sources parameter that will allow for
only those sources that are defined by the user to be used.
2014-10-28 21:53:41 -04:00
Fabian Ruff
8990e18e6d fix copy and paste bug 2014-10-27 18:23:00 +01:00
Fabian Ruff
d33c7b4d7a Add password to rdp_info hash
Any specific reason the password was omitted from the rdp_info hash?

Without the password in the rdp_info hash I see no way of figuring out the password in the rdp_client capability.
2014-10-27 18:21:02 +01:00
Adam Spiers
6af715b0db silence warnings about unescaped '-' in re char class
Eliminate warnings like this:

vagrant/plugins/hosts/linux/cap/nfs.rb:74: warning: character class has '-' without escape: /^# VAGRANT-BEGIN:( 1000)? ([\.\/A-Za-z0-9-_]+?)$/
2014-10-25 15:38:13 +01:00
Tarrant
eeb11ec653 Merge branch 'master' of github.com:tarrant/vagrant 2014-10-24 13:54:16 -07:00
Tarrant
70fece7a99 Add support for DHCP on tinycore 2014-10-24 13:52:35 -07:00
Tarrant
ba994baa65 Revert "guests/tinycore: error if DHCP [GH-4699]"
This reverts commit 64139f2158a957998126f6cf2abcf1042f982175.
2014-10-24 13:52:06 -07:00
Mitchell Hashimoto
ea983e32c8 hosts/*: NFS prune regexp matches file paths [GH-3815] 2014-10-24 12:16:53 -07:00
Mitchell Hashimoto
64139f2158 guests/tinycore: error if DHCP [GH-4699] 2014-10-24 11:24:16 -07:00
Mitchell Hashimoto
5418e6b85e guests: add remove_public_key to most guests 2014-10-24 10:05:01 -07:00
Mitchell Hashimoto
94b2a8a56b communicators/ssh: insert random key, remove insecure key 2014-10-24 09:58:18 -07:00
Mitchell Hashimoto
37a4000722 providers/virtualbox: more descriptive error if empty version [GH-4657] 2014-10-24 09:20:08 -07:00
Mitchell Hashimoto
da91741b7c provisioners/shell: fix typo 2014-10-23 22:49:26 -07:00
Mitchell Hashimoto
a7d3458abc provisioners/shell: retry getting SSH info a few times [GH-3924] 2014-10-23 22:48:48 -07:00
Mitchell Hashimoto
cc01f01684 hosts/linux: don't use sudo to write NFS if writable [GH-2643] 2014-10-23 22:25:38 -07:00
Mitchell Hashimoto
6ea8dc8e20 core: cleaner output of what provisioner is running if named 2014-10-23 18:47:03 -07:00
Mitchell Hashimoto
97f9948fce core: provisioners are defined differently now 2014-10-23 18:40:14 -07:00
Mitchell Hashimoto
aa981cf4ec hosts/bsd: only use sudo if we can't write /etc/exports [GH-2643] 2014-10-23 17:43:58 -07:00
Mitchell Hashimoto
ad758bf69a core: prefer providers in the Vagrantfile [GH-3812] 2014-10-23 15:32:54 -07:00
Mitchell Hashimoto
b656bf4ae5 providers/docker: build output [GH-3739] 2014-10-23 15:03:09 -07:00
Gilles Cornu
1e324093a5 provisioners/ansible: spare machine.ssh_info calls
As a result of #4670 and the safe decision to not memoize
machine.ssh_info (see 89a4a29d65cace4d970d0f220ad01815883ab8aa and
5036d16461cfafde5274836d51b97740c23bd4eb), it is preferable to store the
ssh_info hashes and avoid multiple function calls when generating the
ansible inventory.
2014-10-23 22:58:01 +02:00
Mitchell Hashimoto
f23c5ebc46 commands/plugin: list puts plugin namein machine readable output
[GH-4506]
2014-10-23 12:00:46 -07:00
Mitchell Hashimoto
06defb37c7 commands/up: if all machines autostart:false, start none [GH-4552] 2014-10-23 11:46:22 -07:00
Mitchell Hashimoto
37a04b4bfc provisioners/puppet: use correct error class [GH-4520] 2014-10-23 10:46:11 -07:00