vagrant-cloudinit 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b39129f5562786b56cee8dee5d1a314e634ed723
4
- data.tar.gz: e09607f0679930f3a395ae15d0796dc1e08bd948
3
+ metadata.gz: d1380635d7b6d9d25fbeb07e3338485539cae765
4
+ data.tar.gz: f124835b91aafd33fd29db51aced2a96549f5cd4
5
5
  SHA512:
6
- metadata.gz: 8d10be3edc95a1a5f06e47edb6a3602720134a6efedbbed0ac0024c62915c58aa4b09d9ff29003c5e7b5fd3b51dd9768c7e89dded0decc0062f6b5b8267ec55b
7
- data.tar.gz: 4b3ba1adb4c06abecee076f1de5a72cd96be7d8335269097e7feda174ae05856ea844b93c9fa5c0bcb9079258ccf3f25ad58bd8934aad45f957d1e395e19f2d5
6
+ metadata.gz: 64d799ea87c5d0c3d84602e0f36fe33adb5c9f748728d820c610199117da083c145d2959ba7b682bdf9fda5d7b5570fa6fef3edabdd063f78cb0cc4cac7cee93
7
+ data.tar.gz: 3acb877e5aad122331c92cfb51b349a48bbbd7233f8ed5cd1e99aa437060f912cbc38e7349e78d6cd3e6688a5e534698ad7c74bf7073a71e4f0b2f11ceba944e
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module CloudInit
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -8,7 +8,6 @@ require 'tempfile'
8
8
 
9
9
  module VagrantPlugins
10
10
  module CloudInit
11
- VERSION = "0.0.1"
12
11
 
13
12
  class Plugin < Vagrant.plugin("2")
14
13
  name "CloudInit"
@@ -36,24 +35,36 @@ module VagrantPlugins
36
35
  user_data = File.expand_path(config.user_data)
37
36
  meta_data = ensure_metadata()
38
37
 
39
- iso_file = Tempfile.new(['nocloud', '.iso'])
38
+ iso_path = File.join(machine.data_dir, "cloud-init.iso")
40
39
  system("mkisofs",
41
40
  "-joliet", "-rock",
42
41
  "-volid", "cidata",
43
- "-output", iso_file.path,
42
+ "-output", iso_path,
44
43
  "-graft-points",
45
44
  "user-data=#{user_data}",
46
45
  "meta-data=#{meta_data}")
47
46
 
48
47
  # TODO add support for other providers
49
48
  if machine.provider_name == :virtualbox then
49
+
50
+ # Ensure we have a SAS device
51
+ begin
52
+ machine.provider.driver.execute_command [
53
+ "storagectl", machine.id.to_s,
54
+ "--name", "SAS",
55
+ "--add", "sas",
56
+ "--controller", "LSILogicSAS",
57
+ "--bootable", "off"
58
+ ]
59
+ rescue Exception
60
+ end
61
+
50
62
  machine.provider.driver.execute_command [
51
63
  "storageattach", machine.id.to_s,
52
- "--storagectl", "SCSI",
53
- "--port", "2",
54
- "--device", "0",
64
+ "--storagectl", "SAS",
65
+ "--port", "4",
55
66
  "--type", "dvddrive",
56
- "--medium", iso_file.path.to_s
67
+ "--medium", iso_path
57
68
  ]
58
69
  end
59
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-cloudinit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Keane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2018-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler