1516 Commits

Author SHA1 Message Date
Gilles Cornu
c1f3d114f5 provisioners/ansible(both): add galaxy support
Close #2718
2015-11-17 22:08:29 +01:00
Gilles Cornu
b9738a8c4c provisioners/ansible: add missing unit test
Related to #5292
2015-11-17 22:08:18 +01:00
Gilles Cornu
a0576349fe provisioners/ansible(both): reorganize i18n texts
These adaptations will make even more sense with the upcoming
introduction of `ansible-galaxy` support.
2015-11-17 22:08:18 +01:00
Gilles Cornu
a3c077cbe0 Merge branch 'gildegoma/ansible-force-ssh-user'
Resolved conflicts in
  plugins/provisioners/ansible/config.rb
  plugins/provisioners/ansible/provisioner.rb
  test/unit/plugins/provisioners/ansible/provisioner_test.rb
  website/docs/source/v2/provisioning/ansible.html.md

ref #6348
2015-11-08 14:01:23 +01:00
Gilles Cornu
9bfdaf7e75 provisioners/ansible: introduce ansible_local
With this change, the existing host-based Ansible provisioner is
refactored to share a maximum of code with this new guest-based Ansible
provisioner.

At this stage of development, the existing unit tests are intentionally
modified as little as possible, to keep safe the existing funtionalities.

Other issues resolved by this changeset:
 - Display a warning when running from a Windows host [GH-5292]
 - Do not run `ansible-playbook` in verbose mode when the `verbose` option
   is set to an empty string.
2015-11-08 10:42:48 +01:00
Mitchell Hashimoto
72e13ee9ef test: add tests for provider command 2015-11-04 14:26:22 -08:00
Gilles Cornu
dde94a3ce7 provisioners/ansible: add force_remote_user option
The benefits of the following "breaking change" are the following:
- default behaviour naturally fits with most common usage (i.e. always
  connect with Vagrant SSH settings)
- the autogenerated inventory is more consistent by providing both the
  SSH username and private key.
- no longer needed to explain how to override Ansible `remote_user` parameters

Important: With the `force_remote_user` option, people still can fall
back to the former behavior (prior to Vagrant 1.8.0), which means that
Vagrant integration capabilities are still quite open and flexible.
2015-11-02 09:03:15 +01:00
matthewcodes
cbb03a02d4 Updating tests to check for single quote 2015-10-28 16:46:43 +00:00
Dan Dunckel
9d87be51da Small refactor on conditional check and add tests 2015-10-15 12:25:50 -07:00
Seth Vargo
c88d52082a Merge pull request #6296 from tomfanning/master
Hyper-V set mac address
2015-10-14 13:02:53 -04:00
Mitchell Hashimoto
5e48d35911 Merge pull request #6229 from mitchellh/b-winrm-info-respect-timeout
communicators/winrm: respect boot_timeout when fetching winrm_info
2015-10-12 15:50:05 -04:00
Mitchell Hashimoto
06f8595bc0 kernel/v2: clone option 2015-10-08 11:59:09 -04:00
Mitchell Hashimoto
ec0326f1c8 Merge pull request #6377 from mitchellh/f-cap-command
"cap" command
2015-10-08 10:52:14 -04:00
Mitchell Hashimoto
99d29f17fa commands/cap 2015-10-08 10:35:36 -04:00
Mitchell Hashimoto
31ae00cfc3 test: more tests for snapshots 2015-10-08 09:10:55 -04:00
Mitchell Hashimoto
199a58fdd9 test: test IPv6 2015-10-01 08:47:25 -04:00
Mitchell Hashimoto
7e18a92bd9 test: fix tests 2015-10-01 08:45:44 -04:00
Brian Dwyer
c23610d703 Update test 2015-09-27 23:24:01 -04:00
tomfanning
41beaac074 Hyper-V set mac address 2015-09-22 11:35:55 +01:00
Sam Phippen
379dcfa568 Add a failing test for #6065 2015-09-12 14:31:49 +01:00
Paul Hinze
1e84cc4d6a communicators/winrm: respect boot_timeout when fetching winrm_info
We gained a ton of improvemnts to WinRM error handling in
https://github.com/mitchellh/vagrant/pull/4943, but we also got one bug.

The new code raises an exception when `winrm_info` does not return right
away. This was preventing us from catching the retry/timout logic that's
meant to wait until boot_timeout for the WinRM communicator to be ready.

This restores the proper behavior by rescuing the WinRMNotReady
exception and continuing to retry until the surrounding timeout fires.
2015-09-02 16:36:23 -05:00
Jeremy Roberts
44154c92a9 Fixing WinRM communicator unit test. 2015-08-31 11:42:34 -04:00
konomae
ad9a7324c5 Fix invalid ini entry error when ansible_ssh_private_key_file contains spaces 2015-08-29 18:00:20 +09:00
Brian Dwyer
15ec95328a Update test 2015-07-28 13:24:39 -04:00
Gilles Cornu
3842a1f710 provisioners/ansible: provide ssh identities via ANSIBLE_SSH_ARGS (when necessary)
When provisioning multiple machines in sequence (the default vagrant
behaviour), it doesn't make sense to require to provide the private ssh
key(s) via the custom ansible inventory script/file.

To align with the handling of multiple ssh keys per machine, we won't
rely any longer on `--private-key` command line argument, but only pass
the keys via `ANSIBLE_SSH_ARGS` environment variable.

Note that when vagrant generates the ansible inventory and that only one
key is associated to a VM, this step would be redundant, and therefore
won't be applied.

This change fixes the breaking change introduced by 3d62a91.
2015-07-10 08:51:17 +02:00
Luis Pabón
76651a413d provisioners/ansible: Update unit tests
Signed-off-by: Luis Pabón <lpabon@redhat.com>
2015-07-10 08:51:17 +02:00
Seth Vargo
d72306b6d5 Fix command builder tests 2015-07-09 21:36:50 -06:00
Seth Vargo
06dcd55f57 Fix tests 2015-07-09 16:59:17 -06:00
Mitchell Hashimoto
e903988461 fix tests 2015-07-09 14:14:30 -06:00
Mitchell Hashimoto
c1508cd893 kernel/v2: customizable sudo_command [GH-5573] 2015-07-09 09:30:47 -06:00
Mitchell Hashimoto
606a8fdde2 providers/docker: validate create args is list [GH-4850] 2015-07-08 10:25:32 -06:00
Mitchell Hashimoto
c2cae80de5 providers/dock: pull image prior to starting 2015-07-08 10:09:15 -06:00
Gilles Cornu
839a2e6fa6 provisioners/ansible: show ansible-playbook only when the verbose option is enabled
Revert 1c884fa4e5a847549afa45350e37b0362c50feae which introduced the
following bug:

Instead of allowing to dump the `ansible-playbook` command details when
VAGRANT_LOG=debug was defined, it was then impossible to disable this
console output when VAGRANT_LOG was undefined (in such case,
``@logger.debug? systematically returns `true`)

In order to keep things simple and focused, it is preferable to drop the
bad idea to mix Ansible verbosity and Vagrant log level.

Fix #5803
2015-07-07 22:37:06 +02:00
Mitchell Hashimoto
9c7f666e48 provisioners/docker: support restart flag [GH-4477] 2015-07-07 12:17:24 -06:00
Mitchell Hashimoto
bd0626672b Merge pull request #5818 from mitchellh/issue-5790-password-in-cleartext
provisioner/shell: remove plaintext auth from Windows powershell
2015-07-06 15:21:47 -06:00
Mitchell Hashimoto
f5e38a4a14 kernel/v2: not an error if synced folder guest path is empty [GH-4833] 2015-07-06 14:58:48 -06:00
Mitchell Hashimoto
2fc8d99f6d provisioners/file: validate source relative to Vagrantfile path
[GH-5252]
2015-07-06 14:22:00 -06:00
Mitchell Hashimoto
d03b1f6930 push/atlas: ATLAS_TOKEN env var works [GH-5489] 2015-07-06 11:01:50 -06:00
Shawn Neal
d2671faa56 Fix WinRM elevated shell test
Username, password, and encoded command are now passed via PowerShell arguments which the test needs to account for.
2015-06-10 16:17:30 -07:00
Francesco
c66df8cd2c Updating the test to see the changes to the mount pass parameter 2015-06-08 09:48:21 +01:00
Gilles Cornu
272fb27e05 provisioners/ansible: trim white spaces
[ci skip]
2015-06-01 10:12:22 +02:00
Gilles Cornu
f7894d9c8c provisioners/ansible: fix broken colorized output
After #5532 (e745436df3c64537570953d4d815eaec840da46d), it was no longer
possible to enable ansible colorized output. Even though
`ANSIBLE_NOCOLOR` has no effect *at the moment* in vagrant+ansible
integration, I agree to keep it for clarity and consistence.

The new `--no-color` behaviour (bug fix #5531) is now covered by a unit
test.

//cc @marsam, @sethvargo
2015-06-01 08:36:09 +02:00
Seth Vargo
6a48af6350 Merge pull request #5532 from marsam/fix/master/ansible-no-color
Disable color if in ansible provisioner if Vagrant has no color
2015-05-31 20:34:06 -07:00
Seth Vargo
6309847420 Merge pull request #5512 from johnsonj/issue_3620
For SMB on Linux guests, specify the user's domain as a separate parameter
2015-05-31 20:19:08 -07:00
Seth Vargo
56da192878 Merge pull request #5623 from otagi/tinycore-changehostname
TinyCore change_host_name capability
2015-05-30 11:52:54 -07:00
Seth Vargo
6699e02bcf Minor cleanup 2015-05-30 11:47:23 -07:00
Seth Vargo
388c2f2383 Merge pull request #5539 from vvchik/vlanid
HyperV provider: VlanID configuration possibility
2015-05-30 11:46:43 -07:00
Tiago Mendes-Costa
36f89afbdf Added unit test for tinycore change_host_name. 2015-04-22 16:12:46 +02:00
Fabio Rapposelli
90bb760b3b Added tests
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-04-20 14:56:26 -07:00
Jeff Johnson
9d50f72df3 For SMB on Linux guests, specify the user's domain as a separate parameter to the mount command. This is more reliable than passing user@domain as the username. This is not needed for SMB on Windows guests as they expect the user@domain form.
This does not change how it is configured in the Vagrantfile.

Fixes #3620
2015-03-31 08:16:06 -07:00