vagrant-invade 0.5.4 → 0.5.5
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/Gemfile.lock +1 -1
- data/lib/vagrant-invade/action/validate.rb +24 -23
- data/lib/vagrant-invade/validator/plugin/hostmanager.rb +0 -23
- data/lib/vagrant-invade/version.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: 4eb14c72832a49787843fbcb61f2ceeddaa1f1b1
|
|
4
|
+
data.tar.gz: 6de14569a13b41479d284f197f10e1df5810b4d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f41c0f60be3cb2f0384dc38f373804110bc8da0915f0b318bdcc24901cb1a7527e9f359ab735ce8bafc7bb4f66f7a69631eee090839b5612ac38f7add2b31e1
|
|
7
|
+
data.tar.gz: 13688fb8d5c068d48bdd3d919bbbaeda47ccc6125adca21622e52d9ab2631282762e72907916bb9fbf8bbc12f2a1e88eee624b967cc1c840af5be5c7abab4192
|
data/Gemfile.lock
CHANGED
|
@@ -27,25 +27,26 @@ module VagrantPlugins
|
|
|
27
27
|
|
|
28
28
|
# Hostmanager Plugin
|
|
29
29
|
unless config['hostmanager'] == nil
|
|
30
|
+
@env[:ui].info("\n[Invade]: Validating HOSTMANAGER part ...") unless quiet
|
|
30
31
|
config['hostmanager'] = Validator::HostManager.new( config['hostmanager']).validate
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
# Iterate over each machine configuration
|
|
34
35
|
machines = config['machines']
|
|
35
36
|
unless machines == nil
|
|
36
|
-
machines.each_with_index do |(machine,
|
|
37
|
+
machines.each_with_index do |(machine, part), index|
|
|
37
38
|
|
|
38
39
|
# VM
|
|
39
|
-
unless
|
|
40
|
-
@env[:ui].info("\n[Invade]
|
|
41
|
-
|
|
40
|
+
unless part['vm'] == nil
|
|
41
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating VM part...") unless quiet
|
|
42
|
+
part['vm'] = Validator::VM.new(env, part['vm']).validate
|
|
42
43
|
end
|
|
43
44
|
|
|
44
45
|
# NETWORK
|
|
45
|
-
unless
|
|
46
|
-
@env[:ui].info("\n[Invade]
|
|
46
|
+
unless part['network'] == nil
|
|
47
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating NETWORK section...") unless quiet
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
part['network'].each do |type, network|
|
|
49
50
|
@env[:ui].info("\tNetwork: #{type}") unless quiet
|
|
50
51
|
case type
|
|
51
52
|
when 'private', 'private_network', 'privatenetwork', 'private-network'
|
|
@@ -61,10 +62,10 @@ module VagrantPlugins
|
|
|
61
62
|
end
|
|
62
63
|
|
|
63
64
|
# PROVIDER
|
|
64
|
-
unless
|
|
65
|
-
@env[:ui].info("\n[Invade]
|
|
65
|
+
unless part['provider'] == nil
|
|
66
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating PROVIDER section...") unless quiet
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
part['provider'].each do |type, provider|
|
|
68
69
|
@env[:ui].info(" Provider: #{type}") unless quiet
|
|
69
70
|
case type
|
|
70
71
|
when 'virtualbox'
|
|
@@ -78,10 +79,10 @@ module VagrantPlugins
|
|
|
78
79
|
end
|
|
79
80
|
|
|
80
81
|
# SYNCED FOLDER
|
|
81
|
-
unless
|
|
82
|
-
@env[:ui].info("\n[Invade]
|
|
82
|
+
unless part['synced_folder'] == nil
|
|
83
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating SYNCED FOLDER section...") unless quiet
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
part['synced_folder'].each do |name, sf|
|
|
85
86
|
@env[:ui].info(" Synced Folder: #{name}") unless quiet
|
|
86
87
|
case sf['type']
|
|
87
88
|
when 'nfs'
|
|
@@ -95,10 +96,10 @@ module VagrantPlugins
|
|
|
95
96
|
end
|
|
96
97
|
|
|
97
98
|
# PROVISION
|
|
98
|
-
unless
|
|
99
|
-
@env[:ui].info("\n[Invade]
|
|
99
|
+
unless part['provision'] == nil
|
|
100
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating PROVISION section...") unless quiet
|
|
100
101
|
|
|
101
|
-
|
|
102
|
+
part['provision'].each do |name, provision|
|
|
102
103
|
@env[:ui].info(" Provision: #{name}") unless quiet
|
|
103
104
|
case provision['type']
|
|
104
105
|
when 'shell'
|
|
@@ -116,17 +117,17 @@ module VagrantPlugins
|
|
|
116
117
|
end
|
|
117
118
|
|
|
118
119
|
# SSH
|
|
119
|
-
unless
|
|
120
|
-
@env[:ui].info("\n[Invade]
|
|
120
|
+
unless part['ssh'] == nil
|
|
121
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating SSH section...") unless quiet
|
|
121
122
|
|
|
122
|
-
|
|
123
|
+
part['ssh'] = Validator::SSH.new(env, part['ssh']).validate
|
|
123
124
|
end
|
|
124
125
|
|
|
125
126
|
# PLUGINS
|
|
126
|
-
unless
|
|
127
|
-
@env[:ui].info("\n[Invade]
|
|
127
|
+
unless part['plugin'] == nil
|
|
128
|
+
@env[:ui].info("\n[Invade][#{machine.upcase}]: Validating PLUGIN section...") unless quiet
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
part['plugin'].each do |type, plugin|
|
|
130
131
|
@env[:ui].info(" Plugin: #{type}") unless quiet
|
|
131
132
|
case type
|
|
132
133
|
when 'hostmanager'
|
|
@@ -148,7 +149,7 @@ module VagrantPlugins
|
|
|
148
149
|
@env[:ui].warn('[Invade] Configuration has validation errors. Run \'vagrant invade validate\' to see details.')
|
|
149
150
|
exit
|
|
150
151
|
else
|
|
151
|
-
@env[:ui].success(
|
|
152
|
+
@env[:ui].success("\n[Invade] Configuration validated successfully.")
|
|
152
153
|
end
|
|
153
154
|
|
|
154
155
|
@app.call(env)
|
|
@@ -9,10 +9,6 @@ module VagrantPlugins
|
|
|
9
9
|
attr_accessor :hostmanager
|
|
10
10
|
|
|
11
11
|
DEFAULT = {
|
|
12
|
-
'enabled' => true,
|
|
13
|
-
'manage_host' => true,
|
|
14
|
-
'ignore_private_ip' => false,
|
|
15
|
-
'include_offline' => true,
|
|
16
12
|
'aliases' => nil
|
|
17
13
|
}
|
|
18
14
|
|
|
@@ -24,25 +20,6 @@ module VagrantPlugins
|
|
|
24
20
|
def validate
|
|
25
21
|
return nil unless @hostmanager
|
|
26
22
|
|
|
27
|
-
@hostmanager['enabled'] = Validator.validate_boolean(
|
|
28
|
-
@hostmanager['enabled'], 'enabled', DEFAULT['enabled']
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
# MANAGE HOST (updates hosts /etc/hosts file)
|
|
32
|
-
@hostmanager['manage_host'] = Validator.validate_boolean(
|
|
33
|
-
@hostmanager['manage_host'], 'manage_host', DEFAULT['manage_host']
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
# IGNORE PRIVATE IP (machine's IP address is defined by either the static IP for a private network configuration or by the SSH host configuration)
|
|
37
|
-
@hostmanager['ignore_private_ip'] = Validator.validate_boolean(
|
|
38
|
-
@hostmanager['ignore_private_ip'], 'ignore_private_ip', DEFAULT['ignore_private_ip']
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
# INCLUDE OFFLINE (boxes that are up or have a private ip configured will be added to the hosts file)
|
|
42
|
-
@hostmanager['include_offline'] = Validator.validate_boolean(
|
|
43
|
-
@hostmanager['include_offline'], 'include_offline', DEFAULT['include_offline']
|
|
44
|
-
)
|
|
45
|
-
|
|
46
23
|
# ALIASES
|
|
47
24
|
@hostmanager['aliases'] = Validator.validate_array(
|
|
48
25
|
@hostmanager['aliases'], 'aliases', DEFAULT['aliases']
|