Commit Graph

571 Commits

Author SHA1 Message Date
Mitchell Hashimoto cc2d393611 Merge pull request #5892 from PatOShea/master
provisioner/salt: Updated version for windows and added passing in version via vagrantfile
2015-07-06 15:11:08 -06:00
Mitchell Hashimoto 2fc8d99f6d provisioners/file: validate source relative to Vagrantfile path
[GH-5252]
2015-07-06 14:22:00 -06:00
Jeff Quast 1ac3d17773 bugfix: undefined local variable or method `dir'
resolves bug introduced in 74d22069d4
2015-07-06 11:39:07 -07:00
Mitchell Hashimoto fec6ef11c8 provisioners/puppet: just quiet the NFS errors for Puppet [GH-5456] 2015-07-06 11:19:32 -06:00
Mitchell Hashimoto e64cef9d31 provisioners/chef: fix crash if run list is somehow nil [GH-5545] 2015-07-05 17:30:29 -07:00
Pat O'Shea eab702da83 Adding config to set version to install 2015-07-04 01:25:31 -06:00
arthurvanduynhoven 94549ab755 Need to do update before installing linux-image-extra kernel in case system is outdated. 2015-06-24 14:56:28 +02:00
Seth Vargo b92d4b21a1 Add UI::Interface#color? 2015-06-01 11:49:09 -04:00
Tim O'Guin 72e63767ac Salt Provisioner: refactor custom install_type option to add install_command instead 2015-06-01 10:37:41 -05:00
Tim O'Guin 0b24866537 merged in master and resolved conflict in Salt provisioner docs 2015-06-01 10:07:28 -05:00
Gilles Cornu f7894d9c8c provisioners/ansible: fix broken colorized output
After #5532 (e745436df3), 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 3017243a24 Merge pull request #5577 from luciddg/fix/master/docker-provisioner-restart-fix
Use service command to restart docker, not upstart.
2015-05-31 20:44:48 -07: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 f5c77765fa Merge pull request #5437 from Jamezz/master
Fix issue #4152: Salt minion bootstrapping
2015-05-31 20:08:32 -07:00
Seth Vargo b90807648b Style fixes 2015-05-31 10:19:03 -07:00
Seth Vargo e34308ec12 Merge pull request #4371 from andrewmains12/salt_orchestrations
Added ability to run salt orchestrations to Salt provisioner
2015-05-31 10:17:54 -07:00
Seth Vargo 01ce48ea9e Merge pull request #5669 from taliesins/ChefProviderWindowsSupport
Use powershell syntax for Chef provisioner when using windows guest
2015-05-30 21:31:43 -07:00
John Cooper 7f716f4b63 Added synced_folder_args to puppet provisioner 2015-05-30 21:26:05 -07:00
Seth Vargo 042928db9f Merge pull request #5601 from benh57/environments_wip
Puppet 4 and Puppet environments support
2015-05-30 21:04:48 -07:00
Seth Vargo 50c0c487fb Style cleanup for new name option 2015-05-30 20:57:49 -07:00
Seth Vargo afc02ed681 Merge pull request #5607 from purpleidea/feat/named-shell
Add :name attribute to shell provisioner.
2015-05-30 20:54:34 -07:00
Seth Vargo 464e3f5bec Merge pull request #5749 from jeremyplichta/patch-1
change to https in sources.list.d
2015-05-30 11:59:05 -07:00
Seth Vargo dadee77730 Merge pull request #5637 from paul-krohn/config-not-found-error
Provide path to missing file.
2015-05-30 11:55:25 -07:00
David Cournapeau 3528af2db9 ENH: simpler masterless configuration. 2015-05-30 11:42:15 -07:00
Seth Vargo 0b85e04399 Minor style fixes for salt config_dir 2015-05-30 11:39:24 -07:00
David Cournapeau 74d22069d4 BUG: naive attempt at fixing #2970. 2015-05-30 11:39:23 -07:00
Jeremy Plichta db1bd8d8c1 change to https in sources.list.d
I started having this problem when running the docker provisioner (Vagrant 1.7.2):
Err http://get.docker.io docker/main amd64 Packages
  Undetermined Error
Err http://get.docker.io docker/main i386 Packages
  Undetermined Error
Ign http://get.docker.io docker/main Translation-en_US
Ign http://get.docker.io docker/main Translation-en


Stderr from the command:

stdin: is not a tty
W: Failed to fetch http://get.docker.io/ubuntu/dists/docker/main/binary-amd64/Packages  Undetermined Error

W: Failed to fetch http://get.docker.io/ubuntu/dists/docker/main/binary-i386/Packages  Undetermined Error

Changing this to https seemed to fix the problem for now.
2015-05-22 15:18:11 -06:00
Taliesin Sisson 9233e22974 Use powershell syntax for Chef provisioner when using windows 2015-05-02 16:21:32 +01:00
Ben Hines 9bbfbef977 Be a bit more robust when parsing environment.conf 2015-04-27 23:09:07 -07:00
Paul Krohn c7f32e6159 When you can't find the salt minion or master config, say what you were looking for. 2015-04-26 11:34:34 -07:00
James Shubin b16b85aa7d Add :name attribute to shell provisioner.
This allows the display of friendly output to the user when we think an
important action should be labeled a certain way. This makes vagrant
output a lot more useful when many inline shell provisioners are
present.
2015-04-18 00:35:21 -04:00
Ben Hines 602227ca7d Remove debug spam from development. 2015-04-16 00:50:53 -07:00
Shawn Neal 9de3c481de Salt bootstrap ps1 should be idempotent
- WinRM communicator error detection was tightened up thus exposing an issue in the salt bootstrap script creating directories that already exist.
2015-04-14 05:57:16 -07:00
Ben Hines ffcb58bcd9 When using environments, allow specifying the 'main manifest' using manifest_path and manifest_file. 2015-04-12 12:31:31 -07:00
Ben Hines 0efb9a3932 Fix resolution of puppet path for <4.0 2015-04-12 12:29:50 -07:00
Ben Hines b40426aca5 Properly parse out and use the environment's manifest file which is specified in environment.con. 2015-04-12 02:16:54 -07:00
Ben Hines c8f300e5f5 Correct environment path option to puppet apply. 2015-04-12 01:43:19 -07:00
Ben Hines c701bab253 Properly handle various combinations of Puppet options being specified. 2015-04-12 01:26:41 -07:00
Ben Hines cff7c52716 Use localized error message. Update strings for puppet provisioner errors. 2015-04-12 01:25:40 -07:00
Ben Hines 7a4e7929f8 Don't parse env metadata until provisioning time. TBD: make it functional 2015-04-12 01:18:49 -07:00
Ben Hines 3ee47acb42 Remove debug output 2015-04-12 01:18:12 -07:00
Ben Hines e2c68fc12d Correct environment path config name. 2015-04-11 23:48:18 -07:00
Ben Hines 3a2a9a3b94 Add a binary_path option to the puppet provisioner to match the chef provisioner, and support new puppet 4 install location. 2015-04-11 23:35:25 -07:00
Ben Hines cf847e0410 Merge branch 'master' into environments_wip
Conflicts:
	Vagrantfile
	vagrant.gemspec
2015-04-11 13:33:32 -07:00
Ben Hines e8843b8648 Merge branch 'master' of https://github.com/mitchellh/vagrant 2015-04-11 13:03:18 -07:00
Brandon Matthews c0f43c362c Use service command to restart docker, not upstart.
upstart ships by default on Ubuntu, but not on Debian, and service works
everywhere. Fixes #5245.
2015-04-10 10:06:21 -07:00
Mario Rodas e745436df3 provisioners/ansible: disable color if Vagrant has no color [GH-5531] 2015-03-28 19:05:54 -05:00
Jamezz 71c40bdf6a File architecture string should be x86
As of 2014.7.0, Salt has changed their file naming for 32-bit from win32
to x86.
2015-03-06 13:14:11 -08:00
Jamezz 2f4a0af5d1 Fix issue #4152: Salt minion bootstrapping
Copy the config after we know the installer exits. Also rev the
installed version to 2014.7.1 (latest stable as of 3/4/2015)
2015-03-04 18:08:07 -08:00
Tim O'Guin 0289ab986c Salt Provisioner: Added a 'custom' option to install_type to allow more flexibility in passing arguments to the bootstrap script. Updated the docs. 2015-03-04 15:05:24 -07:00
Mitchell Hashimoto 713be4c5b9 provisioners/chef: actually use command -v 2015-02-24 10:12:25 -08:00
Mitchell Hashimoto c1e2d36090 provisioners/chef: use command -v to check for binary [GH-5167] 2015-02-24 10:11:05 -08:00
Mitchell Hashimoto 734b0d6695 Merge pull request #5315 from jimmidyson/non-existent-docker-group
provisioners/docker: only add user to docker group if docker group exists
2015-02-24 09:45:03 -08:00
Michael Lopez 8adc10f295 Update chef_zero provisioner to use real chef-zero/local-mode to support cookbook version constraint 2015-02-14 22:32:16 +01:00
Michael Lopez 74ffcb27d6 Add 'enable_reporting' attribute for chef provisioner 2015-02-14 22:28:32 +01:00
Jimmi Dyson be2643d40d Only add user to docker group if docker group exists (doesn't in recent Fedora docker-io installs) 2015-02-10 18:11:39 +00:00
Clay Allsopp 69b7200c35 Switch to docker.com
docker.io seems to be deprecated & handled differently from docker.com; see https://twitter.com/clint_newsom/status/557290529810313217
2015-01-19 13:58:45 -08:00
Clinton Wolfe 17a0d08040 Add chef_install(ed?) guest capability for omnios 2015-01-13 17:45:01 -05:00
Gilles Cornu cdd5d54208 provisioners/ansible: fix a typo in a comment
[ci skip]
2015-01-13 18:52:47 +01:00
Gilles Cornu 28e0646dc2 Fix typo error in CHANGELOG
Close #4860

[ci skip]
2015-01-12 10:59:07 +01:00
Gilles Cornu 2ecad8bb93 provisioners/ansible: increase connection timeout
This change helps to avoid troubles like reported in #5018 and #4860.

Note that for sake of configuration simplicity, no new `ansible.timeout`
option has been added. The users who want to set a different value can
rely on `ansible.raw_arguments`.
2015-01-12 10:54:01 +01:00
Gilles Cornu c3cae3d235 provisioners/ansible: add `IdentitiesOnly=yes`
This SSH option is always set, except when Vagrant is running from an
operating system fo the Solaris-family, as this parameter is not
supported by SunSSH. Logic taken from
bed1f8335f/lib/vagrant/util/ssh.rb (L116-L121)

Fix #5017
2015-01-12 08:58:29 +01:00
Mitchell Hashimoto 95e1c19f22 provisioners/puppet: fix exception with module paths [GH-5123] 2015-01-06 22:50:24 -08:00
Mitchell Hashimoto 661657c63f provisioners/chef: fix failing test 2015-01-06 10:57:25 -08:00
Mitchell Hashimoto 5b4b387f04 provisioners/chef: fix failing tests 2015-01-06 10:56:28 -08:00
Mitchell Hashimoto de6b55d007 provisioners/puppet: use predictable synced folders 2015-01-06 10:48:31 -08:00
Mitchell Hashimoto 155516fb6c provisioners/chef: use synced folder cache instead of counter 2015-01-06 10:31:13 -08:00
Seth Vargo d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Andrew Mains 9aa20d5d6b Added ability to run salt orchestrations to salt provisioner 2014-12-31 10:31:35 -08:00
Seth Vargo 97d5a6ebfc Log chef-zero instead of chef-solo 2014-12-28 12:52:54 -05:00
evverx 1cfc5acea3 Update Chef plugin description 2014-12-24 03:53:29 +03:00
Torben Knerr f2b494c2cc don't forget to pass the `installer_download_path` from the config! 2014-12-17 00:48:34 +01:00
Torben Knerr acc4e3806f pass the `download_path` parameter to the `:chef_install` capability so it is available when `Omnibus.build_command(..)` is invoked 2014-12-16 23:40:22 +01:00
Torben Knerr d7bd65b4e2 extend the omnibus command builder with an additional download_path parameter 2014-12-16 23:29:47 +01:00
Torben Knerr 9e7f705bad extend the Chef provisioner base config object with an 'installer_download_path' property 2014-12-16 22:40:19 +01:00
Seth Vargo 954289beb6 Use new Chef Omnibus URL 2014-12-16 12:16:08 -05:00
Seth Vargo 8c8a92c4be Merge pull request #4896 from analyzere/salt-grains-config
Issue #4895: Support grains config for salt
2014-12-14 23:48:02 -05:00
Gilles Cornu 118e223c33 provisioners/ansible: use Docker proxy when needed
Close #4071

Credits and best thanks to @jabclab
2014-12-08 21:43:21 +01: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
Gilles Cornu 3800103228 provisioners/ansible: improve comment wording
Get rid of the Joker, thanks to @maspwr :)
2014-12-07 22:34:19 +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
Ken Crowell 72afdce630 Issue #4895: Support grains config for salt 2014-12-02 18:01:09 -04: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 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
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
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
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 89a4a29d65 and
5036d16461), 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