Commit Graph

1915 Commits

Author SHA1 Message Date
Max Lincoln 0b30dcd078 Merge branch 'winrmssl' into winrm_error_handling
Conflicts:
	test/unit/plugins/communicators/winrm/shell_test.rb
2014-12-11 14:11:06 -05:00
Max Lincoln 234adaae63 WinRM SSL support 2014-12-11 14:09:17 -05:00
Max Lincoln b5a9477405 Fix default forwarded ports 2014-12-11 13:39:24 -05:00
Max Lincoln e7e50d39d9 Fix tests - all pass but auth retry test is extremely slow 2014-12-11 13:23:40 -05:00
Max Lincoln 62ddd92768 Only forward one port for winrm 2014-12-11 13:22:39 -05:00
Max Lincoln 2caaf82ae0 Change default transport back to :plaintext, for backwards compatibility 2014-12-11 13:21:58 -05:00
Max Lincoln 072bb26a30 Change @ssl to @transport 2014-12-11 13:21:58 -05:00
Max Lincoln b3480049ad DRY the Shell: Don't duplicate the Config, especially since there were differing default values 2014-12-11 13:21:58 -05:00
Max Lincoln 1beb221bf3 Rename no_ssl_peer_verification to ssl_peer_verification, and make it configurable 2014-12-11 13:21:58 -05:00
Max Lincoln 2b9626f19c Use Winrm 1.2.0 and fix tests 2014-12-11 13:21:58 -05:00
Seth Vargo 0506e17778 Update Atlas Push to use new vagrant-login API 2014-12-10 15:11:04 -08:00
Seth Vargo 7d6a6cd263 Read the ATLAS_TOKEN in vagrant-login 2014-12-10 15:08:43 -08:00
Mitchell Hashimoto ea8f6b8d04 pushes/atlas: fix tests 2014-12-09 19:32:14 -08:00
Mitchell Hashimoto 02a615a646 Merge remote-tracking branch 'upcoming/master' 2014-12-09 16:18:18 -08:00
Seth Vargo 9ec16774ac Fix failing specs 2014-12-09 00:08:23 -08:00
Seth Vargo b973186cb5 Add vagrant-login to core ;) 2014-12-08 18:26:36 -08:00
Seth Vargo fa7cd37e42 Send the Atlas token 2014-12-08 16:54:19 -08:00
Gilles Cornu 15679f76f8 Merge pull request #4883 from mitchellh/gc-vagrant-1.7-ansible-provisioner
Non-trivial changes and bug fixes for the Ansible provisioner
2014-12-08 21:29:24 +01:00
Seth Vargo 8df0b1848c Just return a symbol 2014-12-08 11:35:15 -08:00
Seth Vargo 78a4fdd6cd Be consistent 2014-12-08 11:35:15 -08:00
Seth Vargo 70b61047c7 Do not support multiple strategies right now 2014-12-08 11:35:15 -08:00
Seth Vargo 6b48199346 Infer push name when only one strategy is defined, support multiple strategies 2014-12-08 11:35:15 -08:00
Mitchell Hashimoto 4a64da5663 Fix some issues around push, fix tests, add missing translations 2014-12-08 11:35:15 -08:00
Mitchell Hashimoto 44e6ec6df8 pushes/atlas: support custom server address 2014-12-08 11:35:15 -08:00
Mitchell Hashimoto 998c5688e8 pushes/atlas: Look for the uploader bin in the embedded dir 2014-12-08 11:35:15 -08:00
Seth Vargo ede14d7daa Separate local-exec push `script` from `inline` 2014-12-08 11:35:14 -08:00
Seth Vargo 612eeb2265 Add local-exec push 2014-12-08 11:35:14 -08:00
Seth Vargo 9d1a43c766 Interpret the app from the CWD 2014-12-08 11:35:14 -08:00
Seth Vargo b9e8f6e892 Interpret the current branch to push to Heroku 2014-12-08 11:35:14 -08:00
Seth Vargo 1f49b7ef62 Remove branch option (it should be interpreted) 2014-12-08 11:35:14 -08:00
Seth Vargo c16dc5c9c9 Add heroku push implementation 2014-12-08 11:35:13 -08:00
Seth Vargo d4058130e4 Add heroku config 2014-12-08 11:35:13 -08:00
Seth Vargo ad15be2e16 Fix a typo in ftp config test 2014-12-08 11:35:13 -08:00
Seth Vargo ed605c9aac Rename Harmony to Atlas, minor config changes 2014-12-08 11:35:13 -08:00
Seth Vargo 8aaf5dc578 Add the FTP push 2014-12-08 11:35:12 -08:00
Seth Vargo 80851a887f Create an Adapter to bridge the APIs between SFTP and FTP libraries 2014-12-08 11:35:12 -08:00
Seth Vargo b90253ea8c Create ftp push config 2014-12-08 11:35:12 -08:00
Mitchell Hashimoto fefaa8da71 pushes/harmony: use to_s.strip.empty? to check if app is set 2014-12-08 11:35:12 -08:00
Mitchell Hashimoto 1705460880 pushes/harmony: expand dir relative to Vagrantfile root path 2014-12-08 11:35:12 -08:00
Mitchell Hashimoto efffc5f2f7 push/harmony: basic push implementation 2014-12-08 11:35:11 -08:00
Mitchell Hashimoto 168715ad7d push/harmony: ability to set uploader path 2014-12-08 11:35:11 -08:00
Mitchell Hashimoto e7b0661a93 pushes/harmony: boilerplate, config 2014-12-08 11:35:11 -08:00
Seth Vargo 41ac448ba8 Add tests for Push config merging and finalizing 2014-12-08 11:35:11 -08:00
Seth Vargo 111a43552e Add tests for Environment#pushes and #Enviroment#push 2014-12-08 11:35:11 -08:00
Seth Vargo f3c35855f0 Add a newline because #ocd 2014-12-08 11:35:11 -08:00
Seth Vargo 7f6a4fa3bd Add tests for plugin manager push_configs 2014-12-08 11:35:11 -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 8a7e546972 Add preliminary File pusher (incomplete) 2014-12-08 11:35:09 -08: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
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
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 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
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 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 dff40a193d Remove useless expect_with.
This seems to be relict of old days and it just forces unnecessary
dependency on Ruby's test unit.
2014-11-04 10:01:32 +01:00
Seth Vargo 59eb0ad2e8 Add Chef Apply provisioner 2014-10-30 15:32:15 -04:00
Seth Vargo 3b416db299 Tabs -> Spaces 2014-10-30 13:43:26 -04:00
Seth Vargo f5b9044e39 Add tests for Chef Zero config 2014-10-30 13:43:26 -04:00
Seth Vargo a8a35757ee Add tests for Chef Solo config 2014-10-30 13:43:26 -04:00
Seth Vargo 9c56061fa9 Add tests for Chef Client config 2014-10-30 13:43:25 -04:00
Seth Vargo 8b3ec500c8 Remove :focus tag (accidentally left from previous commit) 2014-10-30 13:43:25 -04:00
Seth Vargo f009db6101 Add tests for Chef base Config 2014-10-30 13:43:25 -04:00
Mitchell Hashimoto f4dec575ed core: Vagrant::Util::Keypair for generating keypairs 2014-10-24 09:33:44 -07:00
Mitchell Hashimoto 97f9948fce core: provisioners are defined differently now 2014-10-23 18:40:14 -07:00
Mitchell Hashimoto 13dc1832b6 test: fix test for default provider 2014-10-23 16:41:24 -07:00
Mitchell Hashimoto b7478e09f3 core: clean up default logic 2014-10-23 15:59:27 -07:00
Mitchell Hashimoto 768d453739 core: Environment#default_provider can look into machines 2014-10-23 15:52:42 -07:00
Mitchell Hashimoto ad758bf69a core: prefer providers in the Vagrantfile [GH-3812] 2014-10-23 15:32:54 -07:00
Mitchell Hashimoto f0a73c7c05 core: call #state in any #action call [GH-4513] 2014-10-23 12:20:16 -07:00
Mitchell Hashimoto 4827469dee core: recognize more complex content types for json [GH-4525] 2014-10-23 11:26:56 -07:00
Mitchell Hashimoto 2856df79ac core: Vagrant.has_plugin? can take version requirements [GH-4650] 2014-10-23 10:52:02 -07:00
Mitchell Hashimoto f122ed756c Merge pull request #4571 from jperville/docker-provider-allow-multiple-links-to-same-backend
providers/docker: allow multiple links to same backend (different aliases)
2014-10-23 09:45:14 -07:00
Mitchell Hashimoto 5036d16461 update CHANGELOG 2014-10-23 09:15:47 -07:00
Mitchell Hashimoto 381f1332c8 Merge pull request #4670 from gildegoma/dry-check-ssh-perms
Check SSH key permissions in machine.ssh_info
2014-10-23 09:14:31 -07:00
Mitchell Hashimoto 7287604450 Merge pull request #4671 from jramnani/fix/master/nfs_exports_file_for_freebsd_guests
Fix #4658. Bad NFS exports file on OS X & BSD hosts.
2014-10-23 09:12:00 -07:00
Mitchell Hashimoto 296d0639cc providers/docker: support auth [GH-4042] 2014-10-22 13:12:31 -07:00
Mitchell Hashimoto cff57c8d01 core: trigger machine_id_changed for reload [GH-3963] 2014-10-22 12:07:49 -07:00
Mitchell Hashimoto 7988f0fb7c Fix broken unit tests 2014-10-22 09:44:48 -07:00
Mitchell Hashimoto 82f806f438 Fix unit tests 2014-10-22 08:39:59 -07:00
Mitchell Hashimoto 9d4ab18f42 providers/docker: stop_timeout [GH-4504] 2014-10-21 17:50:45 -07:00
Jeff Ramnani bd5fd7ab18 Fix #4658. Bad NFS exports file on OS X & BSD hosts.
For FreeBSD guests, Virtualbox can sometimes report the private network
interface IP address as "0.0.0.0".  This will cause an invalid NFS
exports file to be generated for FreeBSD and OS X hosts.

Fixed by not allowing Virtualbox to report a guest IP address of
"0.0.0.0".
2014-10-20 12:35:30 -05:00
Gilles Cornu 89a4a29d65 Memoize machine.ssh_info when ready for connection 2014-10-20 17:45:02 +02:00
Gilles Cornu 4e81be879c Check SSH key permissions in machine.ssh_info
With this change, any caller of machine.ssh_info is assured that best
efforts will be done to fix possible wrong permissions on the private
key files.

Fix #4652
2014-10-20 17:33:06 +02:00
Shawn Neal 220e4f23b2 Merge pull request #4209 from mwrock/smb_sync
adding smb sync folder implementation for windows guests addressing #3699
2014-10-07 08:19:26 -07:00
Julien Pervillé 97341c3234 providers/docker: allow multiple links to same backend (different aliases). 2014-09-29 18:46:01 +02:00