vagrant-hostsupdater 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fa0669f6bc99a98b0182d0daeb88f22f35987827d604cdac71402a67ebd3fbe
|
4
|
+
data.tar.gz: 0bc5cefa703b1fef67d9f07f06b5fb9bc64c5e7ce90267f8ee25881967d3cbbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74abfa02f179167a588d63892c6e9c47e067c5c19f8a39d2f22ce652bd8cf35f17f17d9585f764c53e4c2c37cae9f4ae52d58f65a9f6d0a24ce9ec01f2819597
|
7
|
+
data.tar.gz: 46d6b9bc921ffb0005aa88eae4a6299d9322ad079372e1a1335548324e23d9799b79e2784f7929632e31fcf66ea953517496821b51ba5f9d363f7b30ebcf2c87
|
@@ -26,9 +26,9 @@ module VagrantPlugins
|
|
26
26
|
# machines and having a static flag will result in a plugin being
|
27
27
|
# executed just once.
|
28
28
|
# https://github.com/agiledivider/vagrant-hostsupdater/issues/198
|
29
|
-
if not @@completed.key?(@machine.name)
|
29
|
+
if @machine.id and not @@completed.key?("#{self.class.name}-#{@machine.name}")
|
30
30
|
run(env)
|
31
|
-
@@completed[@machine.name] = true
|
31
|
+
@@completed["#{self.class.name}-#{@machine.name}"] = true
|
32
32
|
end
|
33
33
|
|
34
34
|
@app.call(env)
|
@@ -5,15 +5,16 @@ module VagrantPlugins
|
|
5
5
|
|
6
6
|
def run(env)
|
7
7
|
machine_action = env[:machine_action]
|
8
|
-
if
|
9
|
-
if
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
@ui.info "[vagrant-hostsupdater] Removing hosts on suspend disabled"
|
15
|
-
end
|
8
|
+
if [:suspend, :halt].include? machine_action
|
9
|
+
if @machine.config.hostsupdater.remove_on_suspend == false
|
10
|
+
@ui.info "[vagrant-hostsupdater] Not removing hosts (remove_on_suspend false)"
|
11
|
+
else
|
12
|
+
@ui.info "[vagrant-hostsupdater] Removing hosts on suspend"
|
13
|
+
removeHostEntries
|
16
14
|
end
|
15
|
+
else
|
16
|
+
@ui.info "[vagrant-hostsupdater] Removing hosts"
|
17
|
+
removeHostEntries
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|