Commit Graph

409 Commits

Author SHA1 Message Date
Mitchell Hashimoto f80fdfa32a privisoners/salt: proper bootstrap URL [GH-3583] 2014-04-30 15:32:20 -07:00
Timothy Messier 513a9bf1ab Set u+w perms on private keys in tmp dir.
This should allow additional `vagrant provision` calls to work when
using the salt provisioner and providing private keys. See #3542.
2014-04-29 11:13:12 -04:00
Mitchell Hashimoto 91c7fb7749 Merge pull request #3554 from mitchellh/chef-provisioner-cleanup
provisioner/chef: Chef provisioner cleanup with Windows
2014-04-27 15:51:30 -07:00
Timothy Messier adeaf29487 Fixed missing end to if 2014-04-27 12:36:01 -04:00
Timothy Messier b93c6df956 The various `install` args should always be passed to salt-bootstrap.
Even when preforming config only, the install flags (i.e. -M, -S, -N),
are used by the bootstrap to determine which configs to copy.

This should help with #3542 and should supersede #3548.
2014-04-27 12:34:24 -04:00
Shawn Neal cf71634813 DRY'd up Chef command building
There's very little difference between the command building on Linux and Windows other than path formatting. All Chef provisioners support the --no-color argument now.

Added unit tests to verify changes.
2014-04-26 21:07:26 -07:00
Shawn Neal ebca0e7e44 Fixed bug in CommandBuilderWindows
CommandBuilderWindows would not include the Chef binary in the command when the binary_path was specified in the config.

Backfilled unit tests for CommandBuilderWindows
2014-04-26 21:07:26 -07:00
Shawn Neal 68ce06561a Removed old unused WinRM chef provisioner scripts 2014-04-26 21:07:26 -07:00
Shawn Neal 38c7203f92 Chef provisioner should utilize reboot capability 2014-04-26 21:07:26 -07:00
Shawn Neal 99ce95198b First pass at integrating new WinRM elevated execution wrapper
- Removed a lot of the Windows special casing from Chef runs
- Don't attempt to use @config.binary_env since we don't properly pass this along to Chef
2014-04-26 21:07:26 -07:00
jjshoe 7ef8477e43 provisioners/ansible: Don't run with two --limits
Conflicts:
	test/unit/plugins/provisioners/ansible/provisioner_test.rb
2014-04-26 11:55:59 +02:00
Timothy Messier c4ae0badc3 Force overwrite of salt configs and keys.
This will tell the salt-bootstrap script to overwrite the master/minion
configs and/or keys each time provision is called. #3524 #3176
2014-04-24 11:56:54 -04:00
Mitchell Hashimoto 1c7faae1ee provisioners/*: prefix the output 2014-04-21 13:56:19 -07:00
Emilien Kenler b77bd3e6bb Unit test + vault password file existence check 2014-04-21 13:56:16 -07:00
Emilien Kenler dd06dffe85 Ansible Vault support
Add the following options to the Ansible provisioner:
- ask_vault_pass
- vault_password_file
2014-04-21 13:56:15 -07:00
Mitchell Hashimoto bed34a730b provisioners/docker: fix module name for new docker provider 2014-04-21 13:54:35 -07:00
Mitchell Hashimoto 2929f7a853 provisoiners/chef: windows command builder 2014-04-21 13:54:08 -07:00
Mitchell Hashimoto 7022b1c29d provisioners/chef: command builder for Linux 2014-04-21 13:54:06 -07:00
Mitchell Hashimoto 909cda4bd1 provisioners/chef: reinit net shares on Windows guests 2014-04-21 13:54:05 -07:00
Mitchell Hashimoto 427d49402d provisioners/cfengine: fix typo 2014-04-21 13:54:04 -07:00
Mitchell Hashimoto 72030d2180 Note provisioners that don't work on Windows guests 2014-04-21 13:54:02 -07:00
Mitchell Hashimoto bd51c16700 provisioners/puppet: execute properly with WinRM 2014-04-21 13:54:00 -07:00
Mitchell Hashimoto 1a0cb9b4c1 privisioners/puppet: wait for reboot on Windows 2014-04-21 13:53:59 -07:00
Mitchell Hashimoto bec2cbbf4d provisioners/shell: check for winrm should be on machine config 2014-04-21 13:53:56 -07:00
Mitchell Hashimoto 4145aa6bcd privisioners/shell: wait for reboot if we can 2014-04-21 13:53:54 -07:00
Mitchell Hashimoto 4fc6fbeef6 privisioners/shell: fix syntax error 2014-04-21 13:53:53 -07:00
Mitchell Hashimoto 286fd2f2f8 provisioners/shell: friendly output if winrm shell provisioning 2014-04-21 13:53:52 -07:00
Mitchell Hashimoto bddc7928ad provisioner/shell: proper extension on temporary file 2014-04-21 13:53:50 -07:00
Mitchell Hashimoto 89671974cf provisioners/shell: handle comm output in a uniform way 2014-04-21 13:53:49 -07:00
Mitchell Hashimoto cde5d0bafb privisioners/shell: execute windows script 2014-04-21 13:53:48 -07:00
Mitchell Hashimoto aca8c4f8f3 provisioners/shelL: don't replace windows lineendings for WinRM 2014-04-21 13:53:47 -07:00
Mitchell Hashimoto 15fe061004 provisioners/shell: cause provision_winrm if winrm 2014-04-21 13:53:46 -07:00
Fabio Rehm efc1122c42 provisioners/docker: Change to VagrantPlugins::DockerProvisioner namespace 2014-04-21 13:51:30 -07:00
Kenny Rasschaert fc95e77237 provisioners/salt: error if minion_config missing 2014-04-19 23:24:30 +02:00
Mitchell Hashimoto d0b0d5635c provisioners/docker: debian install should apt-get update 2014-04-15 13:04:07 -07:00
Mitchell Hashimoto 544f404037 provisioners/docker: configure autostart works if OS can't check status 2014-04-15 12:18:37 -07:00
Mitchell Hashimoto ac8d54132b provisioners/docker: UPDATE CHANGELOG 2014-04-15 12:15:14 -07:00
Henry Hsu 91555d0a86 Fixes not enough time for docker restart before continuing on to next
provisioning step
2014-04-15 11:32:05 -07:00
Mitchell Hashimoto 8a9bbdb71a provisioners/docker: fix linux cap for daemon running 2014-04-14 17:00:12 -07:00
Gilles Cornu 7ed17ae9ed provisioners/ansible: use strict boolean options
With this change, the ansible provisioner fully complies with
the current user documentation.
2014-04-12 13:48:15 +02:00
Mitchell Hashimoto 1144217e2d Merge pull request #3436 from gildegoma/ansible-inventory-path
provisioners/ansible: refer to directory that contains the generated inventory file
2014-04-11 21:16:14 -07:00
Mitchell Hashimoto 374d1c495a provisioners/docker: auto-assigned name shouldn't have / [GH-3216] 2014-04-11 18:50:02 -07:00
Gilles Cornu 0098b7604d provisioners/ansible: refer to inventory directory
By referring the directory that contains the generated inventory file,
users can easily provide more settings with additional files stored in
the same directory.
2014-04-11 08:20:32 +02:00
Mitchell Hashimoto f47213f9b2 guests/coreos: docker_daemon_running cap [GH-3425] 2014-04-10 13:42:12 -07:00
Mitchell Hashimoto e5d1d681d9 Update CHANGELOG 2014-04-09 14:17:51 -07:00
Bernhard Morgenstern 247a2470c0 Fixed error with empty shell provisioner
`read` returns nil on empty files, so the call to `valid_encoding` fails.
2014-04-09 22:56:15 +02:00
Martin Englund 53194f8e12 fix deprecated docker arguments 2014-03-29 22:49:52 -07:00
Mitchell Hashimoto b0f8d050f0 provisioners/salt: style nitpicks 2014-03-12 20:04:57 -07:00
Mitchell Hashimoto 24d8067c7b Merge pull request #3126 from bbinet/fix-salt-provisioning
provisioners/salt: allow master key with no minion key
2014-03-11 09:05:50 -07:00
Mitchell Hashimoto 5a3a501455 provisioners/ansible: request SSH info within provisoin [GH-3111] 2014-03-11 09:03:23 -07:00
Bruno Binet 9625957203 Fix salt provisioning validation
(mismatch between minion/master)
2014-03-11 15:18:24 +01:00
Gilles Cornu 1d09fc4a79 provisioners/ansible: add new option raw_ssh_args
Since the Ansible provisioner now potentially exports ANSIBLE_SSH_ARGS
variable, it is fair to allow to extend the content of this environment
variable (`ssh_args` parameters from ansible.cfg file have lower
priority)
2014-03-09 22:47:24 +01:00
Gilles Cornu 1c0bc20d21 Ansible: Re-enable ControlPersist defaults when ANSIBLE_SSH_ARGS is used
Solve problem discussed in [GH-2952]
2014-03-09 22:41:36 +01:00
Mitchell Hashimoto fa537740c6 provisioners/shell: use detail level output for running 2014-03-08 14:43:35 -08:00
Mitchell Hashimoto 4c9e6e46b2 provisioners/salt: don't use exteranl deep_merge [GH-2348] 2014-03-07 09:18:34 -08:00
Gilles Cornu 1d328f7021 provisioners/ansible: Disable host key checking
Close #3060
2014-03-06 23:55:08 +01:00
Mitchell Hashimoto ada5e8bf7f provisioners/docker: actual auto assign name logic 2014-03-04 07:32:25 -08:00
Mitchell Hashimoto 857b989c47 provisioners/docker: setting to not auto assign name 2014-03-04 07:31:13 -08:00
Matthias Kadenbach 8f76d5e2cd added as ``args << `` 2014-03-03 16:30:42 +01:00
Matthias Kadenbach f6db54b2dc Set param -name automatically (docker run)
``-name`` ist needed for linking containers, i.e. see http://docs.docker.io/en/latest/use/working_with_links_names/#working-with-links-names
2014-03-03 14:20:33 +01:00
Gilles Cornu cf8bfb2347 Ansible: Refactor handling of SSH vars/attributes
Avoid repetitions by using (sometimes lazy loaded) instance attributes
2014-02-28 09:07:52 +01:00
Gilles Cornu db490c5da5 Ansible: force 'ssh' connection only when needed
Remain in 'smart' mode, unless Multiple SSH identities or SSH-Forwarding
are in use.
2014-02-28 09:07:51 +01:00
Bryan Hunt 9480edf05a Ansible: Support SSH-Forwarding
Credits: Problem was originally reported in
dba02f3526
by @picsolvebryan
2014-02-28 09:07:51 +01:00
Gilles Cornu ca1e30d405 Ansible: Support multiple private keys
Note that this feature requires to force `--connection=ssh`. This is not
a big deal as `paramiko` mode is deprecated and in most cases `smart`
mode enables `ssh` mode.
2014-02-28 09:07:51 +01:00
Gilles Cornu a62d28fd7f provisioners/ansible: remove an unused variable
Sorry, I missed that point in GH-2991 review.

[ci skip]
2014-02-28 09:00:05 +01:00
Mitchell Hashimoto a1b29ca82b Merge pull request #2991 from gildegoma/review-pr2926
provisioner/ansible: Ansible single inventory file
2014-02-27 11:30:12 -08:00
Mitchell Hashimoto 12c740898c provisioners/puppet: append module path (default) [GH-2677] 2014-02-24 08:09:24 -08:00
Mitchell Hashimoto 32c45aa70b Revert "Merge pull request #2677 from purpleidea/fix_puppet_apply"
This reverts commit 9ac4ec85dd, reversing
changes made to 8dbad22d72.
2014-02-24 08:07:57 -08:00
Mitchell Hashimoto 6c5179602c provisioners/salt: error if minion_config missing [GH-2893] 2014-02-24 07:58:12 -08:00
Gilles Cornu 1cd2fe56a0 ansible: generate inventory in .vagrant/... 2014-02-24 16:52:38 +01:00
Mitchell Hashimoto a667893cbf provisioners/shell: error if invalid encoding [GH-3000] 2014-02-23 21:50:53 -08:00
Mitchell Hashimoto 5ebe007ddc Merge pull request #3005 from ajw0100/fix-salt-options-error
provisioners/salt: Fix "options are only allowed before install arguments" error.
2014-02-23 21:25:42 -08:00
Teemu Matilainen 7d90191212 provisioners/chef: DRY up `environment` and `node_name` configuration 2014-02-21 23:28:46 -03:00
Teemu Matilainen 24f7d7b9eb Merge pull request #2975 from shanegibbs/chef-solo-role-path
Add support for multiple role paths in chef-solo >= 11.8.0
2014-02-21 23:58:10 -02:00
A.J. Welch 9f0efc19a9 Fix "options are only allowed before install arguments" error.
This reverts feb748f488 and 7cd7077467. `bootstrap_options` is
meant for flag options such as `-D`. This is demonstrated in the
example Vagrantfile from the original plugin:
github.com/saltstack/salty-vagrant/blob/develop/example/complete/Vagrantfile
Flag options must be appended to the options string before install
args such as `install_type` and `install_args`.
2014-02-19 20:24:05 -08:00
Teemu Matilainen eea9c07029 provisioners/chef: set `encrypted_data_bag_secret` to `nil` if it's not uploaded
/cc @shanegibbs

Fixes #2984
2014-02-16 18:14:56 -03:00
Gilles Cornu 709f3f4e6f provisioners/ansible: Change --limit behaviours
- The implicit default limit is always set
- ansible.limit as an empty string won't disable the default limit, but
  will be passed as "--limit=" argument and ansible-playbook will return
  an error (provided host list is empty)
2014-02-16 11:39:15 +01:00
Gilles Cornu c2663f5d30 provisioners/ansible: Fix Group Management
- Support arbitrary depth of "groups of groups of ... groups"
- Skip ':vars' suffix, but allow group names with ':' (yes, Ansible
  accepts this character)
- Like for groups of machines, groups of groups can result "empty", but
  it is not an issue for Ansible. Recursive filter on the group tree is
  a bit hard to implement, and don't brind real added value at Vagrant
  level.
2014-02-16 11:20:00 +01:00
Teemu Matilainen ad34d474bc provisioners/chef: DRY and unify encrypted data bag secret handling
Pull up encrypted data bag secret management into the base classes, thus
also unifying the functionality.

Especially this complements the issues:
  * Upload the secret to provisioning path also with chef-solo [GH-1246]
  * Delete the secret also with chef-client [GH-2712]
  * Remove the secret before uploading also with chef-client [GH-1111]
2014-02-15 22:46:48 -03:00
Mitchell Hashimoto 8c9fde41e9 provisioners/shell: clean up fixnum handling 2014-02-14 12:43:27 -08:00
Ryan Uber 509e29043a Added handling of fixnum values for shell provisioner options both as the value
of `args` itself and as an element inside of an `args` array. Added validation
around passing in arrays for arguments. Just knowing that it is an array is not
enough, because arrays can contain any other type.
2014-02-14 11:47:36 -08:00
Shane Gibbs 5600bd1067 Add support for multiple role paths in chef-solo 2014-02-14 21:48:18 +13:00
Mitchell Hashimoto 59d257f832 provisioners/puppet: mergeable config 2014-02-03 22:27:23 +01:00
Mitchell Hashimoto d864187b1a provisioners/docker: configuration is mergeable 2014-02-03 22:23:26 +01:00
Mitchell Hashimoto 38c2a48ff4 provisioners/docker: always pull images [GH-2901] 2014-02-03 16:26:38 +01:00
Mitchell Hashimoto 1d69e95c1c provisioners/docker: config to disablize -d flag 2014-02-03 16:14:59 +01:00
Gilles Cornu 466cf58476 ansible generated inventory: skip group variables
Except ':children' for groups of groups, it is safer to avoid generating
':suffix' blocks. At the moment Ansible only supports (but doesn't
recommend) group variables (:vars), and the Vagrant Ansible provisioner
won't support this way to define variables.
2014-02-02 23:28:04 +01:00
Gilles Cornu f564bf7410 Ansible Groups: Accept single item as String
Syntax errors in `ansible.groups` definition are not well handled:
Error returned: undefined method `each' for "machine1":String (NoMethodError)

Being tolerant here doesn't hurt and may avoid people get
confused/annoyed.
2014-02-02 23:21:06 +01:00
Gilles Cornu 84308964e2 ansible generated inventory: deal with orphan VMs
env.active_machines can potentiall return 'invalid' machines:
- Ignore machines that are not declared in current Vagrantfile
- Warn when machines are missing (it usually occurs when the VM is
  removed without `vagrant destroy` and some orphan metadata remains
  in .vagrant/machines/...)
2014-02-02 23:06:27 +01:00
Mark Aaron Shirley 3bf5032d4b Update Ansible provisioner to only create a single inventory file
The Ansible provisioner will now only create a single inventory file named,
"vagrant_ansible_inventory". All defined Vagrant machines will be added to
this inventory file. Provisioning will now include a "--limit=#{machine}"
option to scope Ansible provisioning tasks to just the current machine. Setting
the Ansible provisioner's "limit" config option will override the new default
limit. Ansible provisioning scripts will now have access to all other defined
machines and what groups they reside in.
2014-02-01 13:04:20 -08:00
Teemu Matilainen b52958bfb6 provisioners/file: expand destination path if capable 2014-02-01 01:23:09 -03:00
Mitchell Hashimoto 09955be2cd provisioners/docker: configure auto start properly for new Docker
[GH-2874]
2014-01-21 20:52:27 -08:00
Mitchell Hashimoto a19e442cf2 provisoiners/docker: only add user to group if not in it [GH-2838] 2014-01-16 10:34:08 -08:00
Mitchell Hashimoto ead1382343 provisioners/docker: fix wrong variable usage
caught by @pda
2014-01-15 17:33:55 -08:00
Mitchell Hashimoto 2ca498a5dd provisioners/docker: build images using new DSL 2014-01-14 09:22:55 -08:00
Mitchell Hashimoto b3de12702a Merge branch 'add_building_local_dockerfiles' of https://github.com/jpfuentes2/vagrant into jpfuentes2-add_building_local_dockerfiles 2014-01-14 08:17:44 -08:00
Mitchell Hashimoto 6a7e07c53f provisioners/chef: don't follow symlink when chown 2014-01-11 08:02:59 -08:00
Mitchell Hashimoto fcae8dd687 Merge pull request #2766 from graingert/patch-1
provisioners/salt: Allow defining of <install-type> and <install-type-args>
2014-01-10 15:43:25 -08:00
Teemu Matilainen 64ea647e09 provisioners/chef-solo: Fix copy&paste "Puppet" from a deprecation message 2014-01-08 13:27:35 -03:00
Thomas Grainger feb748f488 Allow defining of <install-type> and <install-type-args> 2014-01-06 12:22:43 +00:00