chef-provisioning-vagrant 0.8 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/chef/provisioning/driver_init/vagrant.rb +1 -1
- data/lib/chef/provisioning/vagrant_driver.rb +2 -2
- data/lib/chef/provisioning/vagrant_driver/driver.rb +18 -18
- data/lib/chef/provisioning/vagrant_driver/version.rb +1 -1
- data/lib/chef/resource/vagrant_cluster.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b0e9e875e0ebe8b96d73f54af917532954fb1bc
|
4
|
+
data.tar.gz: de2e6bf4c1f09c031d21d0bc45ddc083116e6e76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7675d487e093ba11dc7ff36875c2975c4fcdfd23e3ab0ec5e3d0d1fa1f77bf656f9f6e34717b42baf68fdc04ebaba119154f01d6caea63791ae87b9971f789e3
|
7
|
+
data.tar.gz: f7fc221bbc66a2a4d3a1ce72199c3a8ab32249b86869d8230f39811ffd82341a385740d5a7ef52d5a7aa3789d77dcaf7ed7f2a2a90e528e7e11e0d46edb1e7c5
|
data/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# chef-
|
1
|
+
# chef-provisioning-vagrant
|
2
2
|
|
3
|
-
This is the Vagrant driver for chef-
|
3
|
+
This is the Vagrant driver for chef-provisioning.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'chef/provisioning'
|
2
2
|
require 'chef/resource/vagrant_cluster'
|
3
3
|
require 'chef/provider/vagrant_cluster'
|
4
4
|
require 'chef/resource/vagrant_box'
|
@@ -16,7 +16,7 @@ class Chef
|
|
16
16
|
new_options = { :vagrant_options => { 'vm.box' => box_name } }
|
17
17
|
end
|
18
18
|
|
19
|
-
run_context.
|
19
|
+
run_context.chef_provisioning.add_machine_options(new_options, &block)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'chef/mixin/shell_out'
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
6
|
-
require '
|
7
|
-
require '
|
8
|
-
require '
|
2
|
+
require 'chef/provisioning/driver'
|
3
|
+
require 'chef/provisioning/machine/windows_machine'
|
4
|
+
require 'chef/provisioning/machine/unix_machine'
|
5
|
+
require 'chef/provisioning/convergence_strategy/install_msi'
|
6
|
+
require 'chef/provisioning/convergence_strategy/install_cached'
|
7
|
+
require 'chef/provisioning/transport/winrm'
|
8
|
+
require 'chef/provisioning/transport/ssh'
|
9
9
|
require 'chef/provisioning/vagrant_driver/version'
|
10
10
|
require 'chef/resource/vagrant_cluster'
|
11
11
|
require 'chef/provider/vagrant_cluster'
|
@@ -14,7 +14,7 @@ class Chef
|
|
14
14
|
module Provisioning
|
15
15
|
module VagrantDriver
|
16
16
|
# Provisions machines in vagrant.
|
17
|
-
class Driver <
|
17
|
+
class Driver < Chef::Provisioning::Driver
|
18
18
|
|
19
19
|
include Chef::Mixin::ShellOut
|
20
20
|
|
@@ -96,7 +96,7 @@ module VagrantDriver
|
|
96
96
|
cleanup_convergence(action_handler, machine_spec)
|
97
97
|
|
98
98
|
vm_file_path = machine_spec.location['vm_file_path']
|
99
|
-
|
99
|
+
Chef::Provisioning.inline_resource(action_handler) do
|
100
100
|
file vm_file_path do
|
101
101
|
action :delete
|
102
102
|
end
|
@@ -158,7 +158,7 @@ module VagrantDriver
|
|
158
158
|
convergence_strategy_for(spec, options).cleanup_convergence(action_handler, spec)
|
159
159
|
|
160
160
|
vm_file_path = spec.location['vm_file_path']
|
161
|
-
|
161
|
+
Chef::Provisioning.inline_resource(action_handler) do
|
162
162
|
file vm_file_path do
|
163
163
|
action :delete
|
164
164
|
end
|
@@ -208,7 +208,7 @@ module VagrantDriver
|
|
208
208
|
|
209
209
|
def ensure_vagrant_cluster(action_handler)
|
210
210
|
_cluster_path = cluster_path
|
211
|
-
|
211
|
+
Chef::Provisioning.inline_resource(action_handler) do
|
212
212
|
vagrant_cluster _cluster_path
|
213
213
|
end
|
214
214
|
end
|
@@ -228,7 +228,7 @@ module VagrantDriver
|
|
228
228
|
vm_file_content << " end\nend\n"
|
229
229
|
|
230
230
|
# Set up vagrant file
|
231
|
-
|
231
|
+
Chef::Provisioning.inline_resource(action_handler) do
|
232
232
|
file vm_file_path do
|
233
233
|
content vm_file_content
|
234
234
|
action :create
|
@@ -362,10 +362,10 @@ module VagrantDriver
|
|
362
362
|
|
363
363
|
def machine_for(machine_spec, machine_options)
|
364
364
|
if machine_spec.location['vm.guest'].to_s == 'windows'
|
365
|
-
|
365
|
+
Chef::Provisioning::Machine::WindowsMachine.new(machine_spec, transport_for(machine_spec),
|
366
366
|
convergence_strategy_for(machine_spec, machine_options))
|
367
367
|
else
|
368
|
-
|
368
|
+
Chef::Provisioning::Machine::UnixMachine.new(machine_spec, transport_for(machine_spec),
|
369
369
|
convergence_strategy_for(machine_spec, machine_options))
|
370
370
|
end
|
371
371
|
end
|
@@ -373,12 +373,12 @@ module VagrantDriver
|
|
373
373
|
def convergence_strategy_for(machine_spec, machine_options)
|
374
374
|
if machine_spec.location['vm.guest'].to_s == 'windows'
|
375
375
|
@windows_convergence_strategy ||= begin
|
376
|
-
|
376
|
+
Chef::Provisioning::ConvergenceStrategy::InstallMsi.
|
377
377
|
new(machine_options[:convergence_options], config)
|
378
378
|
end
|
379
379
|
else
|
380
380
|
@unix_convergence_strategy ||= begin
|
381
|
-
|
381
|
+
Chef::Provisioning::ConvergenceStrategy::InstallCached.
|
382
382
|
new(machine_options[:convergence_options], config)
|
383
383
|
end
|
384
384
|
end
|
@@ -416,7 +416,7 @@ module VagrantDriver
|
|
416
416
|
:disable_sspi => true
|
417
417
|
}
|
418
418
|
|
419
|
-
|
419
|
+
Chef::Provisioning::Transport::WinRM.new(endpoint, type, options)
|
420
420
|
end
|
421
421
|
|
422
422
|
def create_ssh_transport(machine_spec)
|
@@ -435,7 +435,7 @@ module VagrantDriver
|
|
435
435
|
options = {
|
436
436
|
:prefix => 'sudo '
|
437
437
|
}
|
438
|
-
|
438
|
+
Chef::Provisioning::Transport::SSH.new(hostname, username, ssh_options, options, config)
|
439
439
|
end
|
440
440
|
|
441
441
|
def vagrant_ssh_config_for(machine_spec)
|
@@ -11,7 +11,7 @@ class Chef::Resource::VagrantCluster < Chef::Resource::LWRPBase
|
|
11
11
|
|
12
12
|
def after_created
|
13
13
|
super
|
14
|
-
run_context.
|
14
|
+
run_context.chef_provisioning.with_driver "vagrant:#{path}"
|
15
15
|
end
|
16
16
|
|
17
17
|
# We are not interested in Chef's cloning behavior here.
|