vagrant-converge 0.2.0 → 0.3.0
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 +1 -1
- data/lib/vagrant-converge/config/guest.rb +14 -14
- data/lib/vagrant-converge/provisioner/guest.rb +1 -1
- data/lib/vagrant-converge/version.rb +1 -1
- data/templates/locales/en.yml +4 -4
- 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: 0791e9918556cb99c21678dc8d5f08cf0bde128e
|
4
|
+
data.tar.gz: 824f759ab8c2cfe8fb2c64a96219797ac8b1a47c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a54988de6a3be5df4dd7e5ea59484162af4b12fa7c160d897e4ec4f768695d0b206a7579c48efee49fcabbb02d64af440fcf522f4774b8ec307cef25d3eb112
|
7
|
+
data.tar.gz: e669531fa5d948cd9295b065d4a0bd567eaf13fc2db72e4b5eb9cbe56d112966247ebfb647eecbf7671a66a966ea03e4227ed9ee03fa45650597976a52412e2a
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Update the plugin with:
|
|
18
18
|
|
19
19
|
## Options
|
20
20
|
|
21
|
-
* `
|
21
|
+
* `hcl` (required) - A list of files to run through Converge. Can be a single path as a string
|
22
22
|
* `ca_file` (optional) - Path to a CA certificate to trust. Requires `use_ssl`
|
23
23
|
* `cert_file` (optional) - Path to a certificate file for SSL. Requires `use_ssl`
|
24
24
|
* `key_file` (optional) - Path to a key file for SSL. Requires `use_ssl`
|
@@ -2,7 +2,7 @@ module VagrantConverge
|
|
2
2
|
module Config
|
3
3
|
class Guest < Vagrant.plugin("2", :config)
|
4
4
|
|
5
|
-
attr_accessor :
|
5
|
+
attr_accessor :hcl
|
6
6
|
attr_accessor :ca_file
|
7
7
|
attr_accessor :cert_file
|
8
8
|
attr_accessor :install
|
@@ -22,7 +22,7 @@ module VagrantConverge
|
|
22
22
|
def initialize
|
23
23
|
super
|
24
24
|
|
25
|
-
@
|
25
|
+
@hcl = UNSET_VALUE
|
26
26
|
@ca_file = UNSET_VALUE
|
27
27
|
@cert_file = UNSET_VALUE
|
28
28
|
@install = UNSET_VALUE
|
@@ -41,7 +41,7 @@ module VagrantConverge
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def finalize!
|
44
|
-
@
|
44
|
+
@hcl = nil if @hcl == UNSET_VALUE
|
45
45
|
@ca_file = nil if @ca_file == UNSET_VALUE
|
46
46
|
@cert_file = nil if @cert_file == UNSET_VALUE
|
47
47
|
@install = true if @install == UNSET_VALUE
|
@@ -68,22 +68,22 @@ module VagrantConverge
|
|
68
68
|
def validate(machine)
|
69
69
|
@errors = _detected_errors
|
70
70
|
|
71
|
-
# Validate
|
72
|
-
if !
|
73
|
-
@errors << I18n.t("vagrant.provisioners.converge.
|
71
|
+
# Validate hcl values
|
72
|
+
if !hcl
|
73
|
+
@errors << I18n.t("vagrant.provisioners.converge.no_hcl")
|
74
74
|
end
|
75
75
|
|
76
|
-
if
|
77
|
-
|
76
|
+
if hcl
|
77
|
+
hcl_is_valid = hcl.kind_of?(Array) || hcl.kind_of?(String)
|
78
78
|
|
79
|
-
if
|
80
|
-
@
|
79
|
+
if hcl.kind_of?(String)
|
80
|
+
@hcl = [ hcl ]
|
81
81
|
end
|
82
82
|
|
83
|
-
if !
|
84
|
-
@errors << I18n.t("vagrant.provisioners.converge.
|
85
|
-
type:
|
86
|
-
value:
|
83
|
+
if !hcl_is_valid
|
84
|
+
@errors << I18n.t("vagrant.provisioners.converge.invalid_hcl",
|
85
|
+
type: hcl.class.to_s,
|
86
|
+
value: hcl.to_s)
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
data/templates/locales/en.yml
CHANGED
@@ -13,10 +13,10 @@ en:
|
|
13
13
|
Converge not found on guest
|
14
14
|
converge_command_failed: |-
|
15
15
|
Converge execution failed
|
16
|
-
|
17
|
-
`
|
16
|
+
invalid_hcl: |-
|
17
|
+
`hcl` must be an array or a path to an existing file. Received: %{value} (as %{type})
|
18
18
|
invalid_params: |-
|
19
19
|
`params` must be a hash of param/value pairs. Recevied: %{value} (as %{type})
|
20
|
-
|
21
|
-
No value provided for
|
20
|
+
no_hcl: |-
|
21
|
+
No value provided for hcl
|
22
22
|
running: Running converge...
|