Commit Graph

788 Commits

Author SHA1 Message Date
Gilles Cornu a8d0c225c6 Merge pull request #6649 from rickard-von-essen:issue-6636
Close #6636

Note that there is no CHANGELOG entry for this bug fix, since the
`ansible_local` provisioner [#2103] has not been released yet.
2015-12-07 22:41:06 +01:00
Gilles Cornu a0980aa8be provisioners/ansible: minor code formatting change
[ci skip]
2015-12-07 22:30:13 +01:00
Gilles Cornu 850716b220 provisioners/ansible: remove erroneous comment
[ci skip]
2015-12-07 22:28:23 +01:00
Rickard von Essen 9f3ebef810 Support ansible install on RedHat derivates and Fedora.
Fixes #6636
2015-12-07 15:44:20 +01:00
Kamjar Gerami b7e9437a77
#3539 - Fixed syntax, language and logic according to comments made by reviewer in PR #6639 2015-12-04 10:05:07 +01:00
Kamjar Gerami 5cbbbb5e28 #3539 - Can't use alphanumeric patterns for box names in ansible.groups: Changed iteration logic for warning message and fixed regex typo 2015-12-04 01:29:22 +01:00
Kamjar Gerami 934bcf9419 #3539 - Can't use alphanumeric patterns for box names in ansible.groups: Host Range Pattern Regex, notification and updates to provisioning web source 2015-12-04 01:13:59 +01:00
Gilles Cornu 4c137a9b6b provisioners/ansible: fix comment indentation
[ci skip]
2015-12-03 09:36:57 +01:00
Gilles Cornu 9867281971 provisioners/ansible: allow symbol in `groups` key
After c49a146467, it makes even more sense
to support Symbol datatypes in `groups` option handling.
2015-12-03 09:34:53 +01:00
Gilles Cornu c49a146467 provisioners/ansible(both): alias String-to-Symbol
String and Symbol types are different when used as a Hash key. By
default the Vagrant machine names are set in Symbol format, but users
may write their `host_vars` entries with String keys. This is a very
simple way to ensure smooth experience, without having to coerce the
data types during the config validation (e.g. with a library like
Hashie, which is currently not in the Vagrant dependencies)

See also:
- https://bugs.ruby-lang.org/issues/5964#note-17
- https://github.com/intridea/hashie#keyconversion
2015-12-02 08:37:41 +01:00
Christian Henz 77b11a989c Implemented host_vars option. 2015-12-01 18:56:28 +01:00
Christian Henz dd4ae1a51c Parse and insert group variables into the generated inventory. 2015-12-01 18:56:28 +01:00
Gilles Cornu eaf918ec35 Merge branch 'gildegoma/5086-ansible-winrm' into master 2015-11-25 22:46:08 +01:00
Seth Vargo 930e166b47 Add :env option to shell provisioner 2015-11-23 19:29:35 -05:00
Seth Vargo 8c3f833e8e Use the new presence helpers in the Chef provisioner 2015-11-23 18:33:47 -05:00
Gilles Cornu ee55379736 provisioner/ansible: support winrm connection mode
This is a first cut to resolve #5086.
2015-11-21 05:34:50 +01:00
Gilles Cornu 2789ce61e0 Merge branch 'gildegoma/2718-ansible-galaxy' into master 2015-11-21 05:21:41 +01:00
Seth Vargo 1b08cfcd09 Do not fail if uninstalling lxc/docker-io fails 2015-11-19 18:37:57 -08:00
Seth Vargo bad4c2103d Only install Docker if it is not already installed 2015-11-19 18:37:57 -08:00
Seth Vargo f5a0c3ed5b Deprecate docker.version 2015-11-19 18:37:57 -08:00
Jason Casden 7076d192c9 Quiet package commands 2015-11-19 18:37:57 -08:00
Jason Casden d2983d4fe4 Use official Docker installer and upgrade for :latest installs 2015-11-19 18:37:57 -08:00
Seth Vargo ec85548bd6 Support arrays for data_bags_path
Fixes GH-5988
2015-11-19 16:17:42 -08:00
Seth Vargo 1fd9aec493 Only append folder suffixes if we are sharing host folder paths
Fixes GH-6472
2015-11-19 16:08:32 -08:00
Seth Vargo 76f3dce5db Remove deprecated options 2015-11-19 15:52:27 -08:00
Seth Vargo df207d2637 Require nodes_path for Chef Zero provisioning
Fixes GH-6110
2015-11-19 15:52:26 -08:00
Gilles Cornu 2384032446 provisioners/ansible: freeze a constant value
Kudos @sethvargo :)

[skip ci]
2015-11-20 00:21:41 +01:00
Gilles Cornu 6dbc74d814 provisioners/ansible: fix code indentation 2015-11-20 00:13:01 +01:00
Gilles Cornu c9fe02cea5 provisioners/ansible_local: remove repetitions 2015-11-20 00:11:44 +01:00
Gilles Cornu 74eb3109cf provisioners/ansible_local: fix a lame bug
I missed to rename the refactored exceptions as AnsibleCommandFailed in
the guest-based parts. The lack of unit tests for these parts hurts...
on my agenda, I swear!
See c1f3d114f5
2015-11-20 00:07:34 +01:00
Seth Vargo c30467a6f9 Allow Chef to install on Windows 2015-11-19 15:01:09 -08:00
Seth Vargo a90e6cfe4c Use the new Chef installation channel and options
This deprecates "prerelease", which will be removed in the next release.
2015-11-19 14:57:01 -08:00
Seth Vargo 43ef927628 Latest will have the formatter option 2015-11-19 14:56:18 -08:00
Seth Vargo 2dbd24129f Remove deprecated method 2015-11-19 14:56:03 -08:00
Seth Vargo 609ff9f7b2 Allow provisioner cleanup task to exit on failure 2015-11-19 14:55:46 -08:00
Gilles Cornu 5659c3f2a0 provisioners/ansible: apply @sethvargo comments
Follow-up of code review of PR #6529
2015-11-19 23:42:01 +01:00
Seth Vargo b8f200a4c1 Only force the formatter if we are on Chef 11 or higher
Fixes GH-6278
2015-11-19 11:48:04 -08:00
Seth Vargo 9559fc549c Automatically generate a node_name for Chef
This is required because the Chef Server almost always needs a node name to
interact. This will default to the hostname, but that's always going to be
`vagrant.vm`, which will collide easily.

This generates a random hostname with `vagrant-` as the prefix and stores the
result in the machine's data directory.
2015-11-19 11:38:33 -08:00
Seth Miller c8a18fda26 Fixing the Salt bootstrap script for Windows
The URL for the download has changed as per issue #6274
2015-11-18 21:55:32 -06:00
Seth Vargo f999218c53 Perform Chef delete operations on the guest instead of the host 2015-11-18 18:28:42 -08:00
Seth Vargo a1a3824e35 Do not throw an error when the Chef node_name is nil 2015-11-18 16:56:31 -08:00
Seth Vargo 244069d5d7 Merge pull request #6049 from bdwyertech/bdwyertech-patch-2
Chef Zero - Fix 'nodes_path' Support
2015-11-18 16:46:02 -08:00
Mitchell Hashimoto c43e0af4d7 Merge pull request #6382 from sophicware/fix/salt-provisioner-install-args
[salt] [bugfix] Restablize Salt provisioner
2015-11-18 15:19:02 -08:00
Mitchell Hashimoto 394f66468d Merge pull request #6489 from invernizzi/master
Update docker installer to work on custom kernels
2015-11-18 15:16:32 -08:00
Mitchell Hashimoto fbdb6c0d19 Merge pull request #6474 from aneeshusa/enable-salt-options-for-masterless
Enable log_level and colorize for salt masterless
2015-11-18 15:11:54 -08:00
Mitchell Hashimoto f5f596ab8b Merge pull request #6389 from grafjo/fix_6151
Fix for #6151 / provisioner puppet_server with Puppet Collection 1
2015-11-18 14:59:58 -08:00
Seth Vargo 72d62e3d2e Merge pull request #6404 from timotei/patch-1
Remove back tick in puppet facts definitions #6403 (Fix vagrant 1.7.3+ with puppet)
2015-11-18 14:02:48 -08:00
Mitchell Hashimoto 90b850aa49 Merge pull request #6307 from tbriggs-curse/fix/master/6306_chef_windows_capability
Fix/master/6306 chef windows capability
2015-11-18 13:48:48 -08:00
Mitchell Hashimoto a31f505731 Merge pull request #6288 from rickard-von-essen/dnf
Use dnf on Fedora guests instead of yum if available.
2015-11-18 13:37:22 -08:00
Mitchell Hashimoto c200190c5b Merge pull request #6259 from philipwigg/5943-fix-puppet-verify-binary
Fix verify_binary for Puppet for Windows guests.
2015-11-18 13:15:34 -08:00
Mitchell Hashimoto e6098f6c4f rename to powershell_elevated_interactive 2015-11-18 12:51:18 -08:00
Mitchell Hashimoto dde21bc95a fix file permissions 2015-11-18 12:48:41 -08:00
Mitchell Hashimoto 37940e7350 Merge pull request #6185 from marc-ta/elevated_interactive
Elevated interactive
2015-11-18 12:46:39 -08:00
Mitchell Hashimoto fedc7e21b3 provisioners/salt: deprecate config_dir 2015-11-18 11:56:07 -08:00
Mitchell Hashimoto 6c250d023e Merge pull request #6073 from johntron/revert-74d22069
Stop trying to upload minion config to privileged directory
2015-11-18 11:52:06 -08:00
Mitchell Hashimoto ab1c0a889c Merge pull request #6050 from benh57/fix_environment_error
Fix string parse error in the environment path missing error message.
2015-11-18 11:40:41 -08:00
Mitchell Hashimoto 6639d56c9c Merge pull request #5999 from PatOShea/patch-4
Correct salt-minion and call ext on windows guest
2015-11-18 11:39:09 -08:00
Mitchell Hashimoto 7f25d49e81 Merge pull request #5991 from Mattias-/fix-puppet-environment-manifest
Fix puppet apply environment default manifest
2015-11-18 11:31:54 -08:00
Gilles Cornu 819c9b6425 provisioners/ansible_local: align console outputs
Use "info" level for main tasks (installing ansible, running galaxy,
running playbook).
Use "detail" level for subsequent details.
2015-11-18 09:37:27 +01:00
Gilles Cornu c1f3d114f5 provisioners/ansible(both): add galaxy support
Close #2718
2015-11-17 22:08:29 +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 75cc6ef8d3 provisioners/ansible_local: fix a str-to-sym bug
Without this change `ansible.version = "latest"` is not considered as
equivalent to `ansible.version = :latest`.
2015-11-12 09:14:35 +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
Luca Invernizzi df32f6ac51 Update docker installer to work on custom kernels
The current docker installer attempt to install the linux-image-extra-`uname -r` DEB package on Debian systems.
This package may not exist, for example on custom kernels (e.g., Linode servers).
If this happens, Vagrant halts the provisioning. However, this package is not really needed in newer Debian releases (such as Ubuntu 14.04).

This small patch checks if the linux-image-extra-`uname -r` package exists, and it will install it if it does. In either case, it will continue provisioning.
2015-11-05 13:56:13 -08:00
Aneesh Agrawal 84408c1682 Enable log_level and colorize for salt masterless 2015-11-02 20:57:29 -05: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
Timotei Dolean 13be9731ab Remove back tick in puppet facts definitions #6403
Starting with vagrant 1.7.3 
(commit 1152b4e1df) we don't
save the command to be executed in the file anymore, but we send
it as a parameter, thus the back tick makes things worse.
2015-10-16 16:20:15 +03:00
Dan Dunckel 9d87be51da Small refactor on conditional check and add tests 2015-10-15 12:25:50 -07:00
Marc Siegfriedt 8e87990599 add the option to make elevated interactive scripts 2015-10-15 12:25:50 -07:00
Johannes Graf 9998544995 Fix for #6151 / provisioner puppet_server with Puppet Collection 1
puppet_server provisioner fails with Puppet Collection 1 with the
following error:

```bash
==> default: Running provisioner: puppet_server...
The `puppet` binary appears not to be in the PATH of the guest. This
could be because the PATH is not properly setup or perhaps Puppet is not
installed on this guest. Puppet provisioning can not continue without
Puppet properly installed.
```
2015-10-10 21:16:12 +02:00
Jurnell Cockhren 86e56aeac3 Revert "Salt Provisioner: Added a 'custom' option to install_type to allow more flexibility in passing arguments to the bootstrap script. Updated the docs."
This reverts commit 0289ab986c.

Refers to issues #6276, #5973, #5936 and #5435

Conflicts:
	website/docs/source/v2/provisioning/salt.html.md
2015-10-08 15:01:00 -05:00
Jurnell Cockhren 1a7c6dcfeb Revert "Salt Provisioner: refactor custom install_type option to add install_command instead"
Refers to issues #6276, #5973, #5936 and #5435

This reverts commit 72e63767ac.

Conflicts:
	website/docs/source/v2/provisioning/salt.html.md
2015-10-08 15:01:00 -05:00
Jurnell Cockhren fb611c7389 Revert "Initialize the install_command salt config var"
Refers to issues #6276, #5973 and #5936

This reverts commit ccd7354665.
2015-10-08 15:01:00 -05:00
Jurnell Cockhren 70e9079449 Revert "Fix alignment of initializer"
Refers to issues #6276, #5973 and #5936

This reverts commit 27d7518636.
2015-10-08 15:01:00 -05:00
Brian Dwyer fd593a85b7 Add `nodes_path` support for the Chef-Solo provisioner 2015-09-27 23:23:28 -04:00
Trey Briggs a5b6e23e20 Removed extra quote in powershell command. 2015-09-22 23:28:14 -05:00
Trey Briggs ed1c219a07 version is a Symbol, convert to String before concat. 2015-09-22 23:26:02 -05:00
Rickard von Essen acde6e1b16 Use dnf on Fedora guests instead of yum if available.
Fixes #6286 now properly installs Docker on Fedora guests.
Fixes #6287 use dnf if available.
2015-09-20 09:30:49 +02:00
Sam Phippen 53714abfa3 Handle encoding errors in shell provisioner newline normalization.
The problem demonstrated in #6065 is that a string has incorrectly been
encoded with US-ASCII even though it contains invalid US-ASCII byte
sequences (any byte with the most significant bit on is invalid in the
US-ASCII encoding).

The thing about doing newline normalization is that it is not actually
sensitive to the presence of US-ASCII byte sequenzes. Additionally, it
is very unlikely that a user will ever be using an encoding where \r\n
is not encoded the same as it would be in ASCII.

This patch first tries the existing method of normalizing the newlines
in the provided script file, if that fails for any reason it force
encodes the string to ASCII-8BIT (which allows the most significant bit
to be on in any individual byte) and then performs the substitution in
that byte space.
2015-09-12 14:36:54 +01:00
Philip Wigg 33b4d6a63d Fix verify_binary for Puppet for Windows guests. 2015-09-11 20:06:21 +01:00
konomae ad9a7324c5 Fix invalid ini entry error when ansible_ssh_private_key_file contains spaces 2015-08-29 18:00:20 +09:00
Jason Woods ff941ef4e8 Fix broken masterless minion configuration 2015-08-03 12:11:32 +01:00
John Syrinek ea7b277f41 Prevent fatal error caused by attempting to upload minion config to
privileged directory
2015-07-31 16:05:55 -05:00
Ben Hines 3f29be0de2 Fix string parse error in the environment path missing error message. 2015-07-28 11:16:20 -07:00
Brian Dwyer e4cdb473bd Bring back `nodes_path` support for the Chef Zero provisioner 2015-07-28 12:41:51 -04:00
지훈 287831dd2e Fix for Issue #6006 - cfengine will now install 2015-07-20 02:08:13 -07:00
Pat O'Shea d34bc38bf3 Updated salt-minion and call ext on windows guest
Salt-minion and salt-call are batch files on a windows guest, not executables.
2015-07-18 20:53:46 -06:00
Mattias Appelgren f349a58a1e provisioners/puppet: Fix Puppet environment default manifest
Also parse the puppet variables $codedir and $environment when
resolving a manifest path from environment.conf
2015-07-18 14:48:03 +02:00
Mitchell Hashimoto 4b217e2128 Merge pull request #5980 from PatOShea/PatOShea-ConfigDir-Typo
Fixed salt minion configuration directory typo
2015-07-17 12:37:44 -07:00
Pat O'Shea a4eede0c42 fixed typo for config_dir
Only exposed when calling highstate with config_dir being set
2015-07-16 18:45:59 -06:00
Pat O'Shea 956bbf011c Changed minion config path for windows
Copy of minion is wrong on windows. Moved to sub-dir, conf.
2015-07-16 18:37:36 -06:00
Mitchell Hashimoto ce5a30b264 provisioners/puppet: fix config merging [GH-5958] 2015-07-15 10:59:34 -07:00
Mitchell Hashimoto 3476491881 update CHANGELOG 2015-07-15 10:57:38 -07:00
Ben Hines 46eedb6491 Back to using 'which' when no path is defined since the winrm communicator overrides it anyway. 2015-07-14 23:55:09 -07:00
Ben Hines 8c2ddac2cd Check for nil config_path. 2015-07-14 23:26:55 -07:00
Ben Hines 8c1ff5ee26 Fix custom puppet.binary_path to work properly on windows.
Fix automatic puppet path detection on windows
2015-07-14 23:21:46 -07:00
William Kral 27d7518636 Fix alignment of initializer 2015-07-11 10:40:17 -07:00
William Kral ccd7354665 Initialize the install_command salt config var 2015-07-11 10:31:19 -07:00
Seth Vargo 516d475f16 Checksum args to each docker container in local data
This allows Vagrant to calculate if a container's arguments (such as the run
arguments) have changed in the Vagrantfile since the original run.

Fixes GH-3055
2015-07-10 11:32:02 -06:00
Seth Vargo 3e3037f313 Add a space before args 2015-07-10 10:49:21 -06: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 f0718d620d provisioners/ansible: Put ssh key in the inventory
Vagrant 1.7.1 creates and injects new ssh keys for each virtual machine.
When it started ansible with the "parallel provisioning trick",
it would only send the ssh key of the targeted virtual machine.
With this change, vagrant now stores the ssh key for each virtual
machines directly in the generated ansible inventory, and thus allow
ansible parallelism.

Note that this change is not sufficient, as it would break vagrant
configuration based on a custom inventory (file or script). This issue
will be addressed in a next commit.

Signed-off-by: Luis Pabón <lpabon@redhat.com>
2015-07-10 08:39:49 +02:00
Seth Vargo 4b1847acf3 Use Chef Client for Chef Zero
Fixes GH-5619
2015-07-09 21:23:42 -06:00
Seth Vargo 40b94afeb5 Update command builder now that provisioning_path has moved to runtime 2015-07-09 17:46:39 -06:00
Seth Vargo 60330218fb Merge pull request #5913 from mitchellh/sethvargo/windows_chef_paths
Use windows-specific Chef paths
2015-07-09 17:05:40 -06:00
Seth Vargo e9bcf147f0 Prefix with guest_ 2015-07-09 17:01:36 -06:00
Seth Vargo 0e039159a6 Calculate Chef paths at provision time 2015-07-09 16:55:55 -06:00
Nicholas Randon eb6aa2ac8c Allow Ansible provisioner to run reliably in parallel
The Ansible Vagrant provisioner has a race where the inventory file is
updated every time the provisioner runs unless a file is provided.

Therefore if Ansible attempts to provision two nodes in parallel, you
may see the following race:
   * System A writes the inventory file and calls Ansible.
   * System B starts to provision and truncates the file before
     creating a new one.
   * Ansible on system A now attempts to read the inventory
     file, which is blank. Ansible bombs out with "ERROR: provided
     hosts list is empty".

To fix this, we only allow Vagrant to update the inventory file if
it needs to.
2015-07-10 00:53:59 +02:00
Seth Vargo 742d47c4cf No longer need subprocess wrapping there :) 2015-07-09 16:06:03 -06:00
Mitchell Hashimoto d51c5fbc69 Merge pull request #5435 from juiceinc/bugfix/salt-provisioner
Update Salt provisioner to allow more flexibility in passing arguments to the bootstrap script
2015-07-09 15:02:34 -06:00
Mitchell Hashimoto 300b9c9109 provisioners/chef: don't check existing set, unique ID
[GH-5199]
2015-07-09 14:04:12 -06:00
Mitchell Hashimoto 9dd5640324 provisioners/docker: for debian, chmod the var lib docker folder 2015-07-08 12:13:25 -06:00
Gilles Cornu 839a2e6fa6 provisioners/ansible: show ansible-playbook only when the verbose option is enabled
Revert 1c884fa4e5 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
Pat O'Shea da67824a53 Adding run_service and minion/master ids for windows 2015-07-07 00:24:23 -06:00
Mitchell Hashimoto 4d2e8fd591 Merge pull request #5860 from arthurvanduynhoven/docker-provisioner-deb-fix
provisioner/docker: Docker Provisioner fails on Debian [ubuntu/trusty64]
2015-07-06 15:16:03 -06:00
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