vagrant-terraform 0.1.12 → 0.1.13
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ebed64768f8d408a91a14581661d5fa99a6712c7a72843364d9e3b4337736a
|
4
|
+
data.tar.gz: e583dc5e55bfb1bd9659fe1754299287f88edbe6c97ff4a6294a3ed60e4aeff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b086d0ae9c5aeb088fe62a34dbb8702880145aa61dfd5df01ff89e544dd538d37ca1a43f4cf91c5af1da8aa838bcdac636af7be6924ff9ae618610756a07cca
|
7
|
+
data.tar.gz: '098baeac795e1731761d248088c755eb686b0f54e7b63b66881d94d030c278e68fc844489ff6afb4850dd93dbcde23ffe80aeb102ff3081e78abd39a6d10d65d'
|
@@ -51,7 +51,8 @@ resource "proxmox_vm_qemu" "#{vmname.gsub(/\./, '-')}" {
|
|
51
51
|
full_clone = "#{config.full_clone}"
|
52
52
|
cores = #{config.cpu_cores.to_i}
|
53
53
|
cpu_type = "#{config.cpu_type}"
|
54
|
-
memory = #{Filesize.from("#{config.memory_size} B").to_f('
|
54
|
+
memory = #{Filesize.from("#{config.memory_size} B").to_f('MB').to_i}
|
55
|
+
balloon = #{Filesize.from("#{config.balloon} B").to_f('MB').to_i}
|
55
56
|
onboot = #{config.onboot}
|
56
57
|
agent = 1
|
57
58
|
vga {
|
@@ -67,7 +68,6 @@ resource "proxmox_vm_qemu" "#{vmname.gsub(/\./, '-')}" {
|
|
67
68
|
virtio {
|
68
69
|
virtio0 {
|
69
70
|
disk {
|
70
|
-
backup = false
|
71
71
|
storage = "#{config.storage_domain}"
|
72
72
|
size = "#{Filesize.from("#{config.disk_size} B").to_f('GB').to_i}G"
|
73
73
|
}
|
@@ -9,6 +9,7 @@ module VagrantPlugins
|
|
9
9
|
attr_accessor :api_url
|
10
10
|
attr_accessor :api_token_id
|
11
11
|
attr_accessor :api_token_secret
|
12
|
+
attr_accessor :balloon
|
12
13
|
attr_accessor :vga
|
13
14
|
attr_accessor :insecure
|
14
15
|
attr_accessor :debug
|
@@ -32,6 +33,7 @@ module VagrantPlugins
|
|
32
33
|
@api_url = UNSET_VALUE
|
33
34
|
@api_token_id = UNSET_VALUE
|
34
35
|
@api_token_secret = UNSET_VALUE
|
36
|
+
@balloon = UNSET_VALUE
|
35
37
|
@vga = UNSET_VALUE
|
36
38
|
@insecure = UNSET_VALUE
|
37
39
|
@debug = UNSET_VALUE
|
@@ -66,6 +68,7 @@ module VagrantPlugins
|
|
66
68
|
@cpu_cores = 1 if @cpu_cores == UNSET_VALUE
|
67
69
|
@cpu_type = 'host' if @cpu_type == UNSET_VALUE
|
68
70
|
@memory_size = '512 MiB' if @memory_size == UNSET_VALUE
|
71
|
+
@balloon = @memory_size if @balloon == UNSET_VALUE
|
69
72
|
@target_node = nil if @target_node == UNSET_VALUE
|
70
73
|
@onboot = false if @onboot == UNSET_VALUE
|
71
74
|
@description = '' if @description == UNSET_VALUE
|
@@ -88,6 +91,12 @@ module VagrantPlugins
|
|
88
91
|
rescue ArgumentError
|
89
92
|
raise "Not able to parse `memory_size`."
|
90
93
|
end
|
94
|
+
|
95
|
+
begin
|
96
|
+
@balloon = Filesize.from(@balloon).to_f('B').to_i
|
97
|
+
rescue ArgumentError
|
98
|
+
raise "Not able to parse `balloon`."
|
99
|
+
end
|
91
100
|
end
|
92
101
|
|
93
102
|
end
|
@@ -10,14 +10,14 @@ module VagrantPlugins
|
|
10
10
|
def terraform_execute(env, command)
|
11
11
|
env[:machine_tf_dir] = ".vagrant/terraform/#{env[:machine].id}" if env[:machine_tf_dir].nil?
|
12
12
|
Dir.mkdir(env[:machine_tf_dir]) unless File.exist?(env[:machine_tf_dir])
|
13
|
+
|
13
14
|
stdout, stderr, status = Open3.capture3(command, :chdir=>env[:machine_tf_dir])
|
14
|
-
|
15
|
-
|
15
|
+
|
16
|
+
if !stderr.empty? && env[:machine].provider_config.debug
|
16
17
|
env[:ui].info("terraform command: #{command}")
|
17
18
|
env[:ui].info("terraform stdout: #{stdout}")
|
18
19
|
env[:ui].info("terraform stderr: #{stderr}")
|
19
20
|
env[:ui].info("terraform status: #{status}")
|
20
|
-
end
|
21
21
|
end
|
22
22
|
|
23
23
|
if status != 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mika Båtsman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: filesize
|