vagrant-nfs_guest 0.1.11 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/example_box/Vagrantfile +1 -1
- data/lib/vagrant-nfs_guest/action/mount_nfs.rb +6 -2
- data/lib/vagrant-nfs_guest/action/unmount_nfs.rb +16 -3
- data/lib/vagrant-nfs_guest/guests/linux/cap/nfs_server.rb +1 -1
- data/lib/vagrant-nfs_guest/hosts/bsd/cap/mount_nfs.rb +0 -4
- data/lib/vagrant-nfs_guest/hosts/bsd/cap/unmount_nfs.rb +0 -4
- data/lib/vagrant-nfs_guest/hosts/linux/cap/mount_nfs.rb +0 -4
- data/lib/vagrant-nfs_guest/hosts/linux/cap/unmount_nfs.rb +0 -4
- data/lib/vagrant-nfs_guest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66cdfd9f758ab3bc1e50e9ea5d4343947c7fe997
|
4
|
+
data.tar.gz: de8345cf62d07dc961fd16ac526ee5d51088e5f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b9e37681172389e4e1e4f0e32fd3aabd16301aeba887899a170bea43f510663ab30840d59d40548a9f4001b911cc9f898ebd2e97630f6f36586b8eabe25acba
|
7
|
+
data.tar.gz: f9f80edd7590c1e1f7f784fdd367bdcf2f6cc371e62de03da28522343c8ad26599d3097209e185aea1e733b269173818111030e60a5b7d3253a98afcb6e22261
|
data/README.md
CHANGED
@@ -2,10 +2,13 @@
|
|
2
2
|
|
3
3
|
## What's New?
|
4
4
|
|
5
|
-
- NEW:
|
6
|
-
- NEW:
|
7
|
-
-
|
8
|
-
-
|
5
|
+
- NEW: moved to version v1.0.0 as it's no longer a "beta" plugin, it's been well used and tested. So figured now is a good time.
|
6
|
+
- NEW: `disabled` flag on shares now are properly respected
|
7
|
+
- UPDATED: share directories on guest are no longer recursively `chown`.
|
8
|
+
- Added untested support for Docker providers (Please raise any issues if they don't work!).
|
9
|
+
- Added Parallels provider support
|
10
|
+
- Redhat/CentOS guest support added.
|
11
|
+
- Now properly handles force halts.
|
9
12
|
- FIXED: suspend and resume with 'up' instead of 'resume' fixed.
|
10
13
|
- Supports Vagrant > 1.6.
|
11
14
|
- Handles actions ```up```, ```halt```, ```destroy```, ```suspend```, ```resume``` and ```package``` properly.
|
data/example_box/Vagrantfile
CHANGED
@@ -21,7 +21,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
21
21
|
# the path on the guest to mount the folder. And the optional third
|
22
22
|
# argument is a set of non-required options.
|
23
23
|
config.vm.synced_folder '.', '/vagrant', disabled: true
|
24
|
-
config.vm.synced_folder './vagrant_share', '/vagrant', create: true, type: 'nfs_guest'
|
24
|
+
config.vm.synced_folder './vagrant_share', '/vagrant', create: true, type: 'nfs_guest', disabled: false
|
25
25
|
#config.vm.synced_folder './vagrant_share', '/vagrant', type: 'nfs'
|
26
26
|
|
27
27
|
end
|
@@ -38,11 +38,15 @@ module VagrantPlugins
|
|
38
38
|
|
39
39
|
# grab the folders to check if any use nfs_guest and require host networking
|
40
40
|
folders = @machine.config.vm.synced_folders
|
41
|
+
|
41
42
|
nfs_guest = false
|
43
|
+
nfs_guest_folders = {}
|
44
|
+
|
42
45
|
folders.each do |name, opts|
|
43
|
-
if opts[:type] == :nfs_guest
|
46
|
+
if opts[:type] == :nfs_guest && opts[:disabled] == false
|
44
47
|
nfs_guest = true
|
45
48
|
opts[:hostpath] = File.expand_path(opts[:hostpath], env[:root_path])
|
49
|
+
nfs_guest_folders[name] = opts.dup
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
@@ -64,7 +68,7 @@ module VagrantPlugins
|
|
64
68
|
if installed
|
65
69
|
# Mount guest NFS folders
|
66
70
|
@machine.ui.info(I18n.t("vagrant_nfs_guest.actions.vm.nfs.mounting"))
|
67
|
-
@machine.env.host.capability(:nfs_mount, @machine.ui, @machine.id, machine_ip,
|
71
|
+
@machine.env.host.capability(:nfs_mount, @machine.ui, @machine.id, machine_ip, nfs_guest_folders)
|
68
72
|
end
|
69
73
|
end
|
70
74
|
end
|
@@ -16,21 +16,34 @@ module VagrantPlugins
|
|
16
16
|
@machine.ui.info(I18n.t("vagrant_nfs_guest.actions.vm.nfs.unmounting"))
|
17
17
|
folders = @machine.config.vm.synced_folders
|
18
18
|
|
19
|
+
nfs_guest = false
|
20
|
+
nfs_guest_folders = {}
|
21
|
+
|
19
22
|
folders.each do |name, opts|
|
20
|
-
if opts[:type] == :nfs_guest
|
23
|
+
if opts[:type] == :nfs_guest && opts[:disabled] == false
|
24
|
+
nfs_guest = true
|
21
25
|
opts[:hostpath] = File.expand_path(opts[:hostpath], env[:root_path])
|
26
|
+
|
22
27
|
if env[:force_halt]
|
23
28
|
# If this is a force halt, force unmount the nfs shares.
|
24
29
|
opts[:unmount_options] = opts.fetch(:unmount_options, []) << '-f'
|
25
|
-
|
30
|
+
|
31
|
+
# We have to change the working dir if inside a hostmount to
|
32
|
+
# prevent "No such file or directory - getcwd" errors.
|
26
33
|
if Dir.pwd.start_with?(opts[:hostpath])
|
27
34
|
Dir.chdir("#{opts[:hostpath]}/..")
|
28
35
|
end
|
29
36
|
end
|
37
|
+
|
38
|
+
nfs_guest_folders[name] = opts.dup
|
30
39
|
end
|
31
40
|
end
|
32
41
|
|
33
|
-
|
42
|
+
if not nfs_guest
|
43
|
+
return
|
44
|
+
end
|
45
|
+
|
46
|
+
@machine.env.host.capability(:nfs_unmount, @machine.ui, nfs_guest_folders)
|
34
47
|
end
|
35
48
|
|
36
49
|
@app.call(env)
|
@@ -151,7 +151,7 @@ module VagrantPlugins
|
|
151
151
|
opts[:group] ||= machine.ssh_info[:username]
|
152
152
|
|
153
153
|
machine.communicate.sudo(
|
154
|
-
"chown
|
154
|
+
"chown #{opts[:owner]}:#{opts[:group]} #{expanded_guest_path}",
|
155
155
|
error_class: Errors::GuestNFSError,
|
156
156
|
error_key: :nfs_create_mounts_failed
|
157
157
|
)
|
@@ -6,10 +6,6 @@ module VagrantPlugins
|
|
6
6
|
|
7
7
|
def self.nfs_mount(environment, ui, id, ips, folders)
|
8
8
|
folders.each do |name, opts|
|
9
|
-
if opts[:type] != :nfs_guest
|
10
|
-
next
|
11
|
-
end
|
12
|
-
|
13
9
|
ips.each do |ip|
|
14
10
|
ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
15
11
|
guestpath: opts[:guestpath],
|
@@ -6,10 +6,6 @@ module VagrantPlugins
|
|
6
6
|
|
7
7
|
def self.nfs_unmount(environment, ui, folders)
|
8
8
|
folders.each do |name, opts|
|
9
|
-
if opts[:type] != :nfs_guest
|
10
|
-
next
|
11
|
-
end
|
12
|
-
|
13
9
|
ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
14
10
|
guestpath: opts[:guestpath],
|
15
11
|
hostpath: opts[:hostpath]))
|
@@ -6,10 +6,6 @@ module VagrantPlugins
|
|
6
6
|
|
7
7
|
def self.nfs_mount(environment, ui, id, ips, folders)
|
8
8
|
folders.each do |name, opts|
|
9
|
-
if opts[:type] != :nfs_guest
|
10
|
-
next
|
11
|
-
end
|
12
|
-
|
13
9
|
ips.each do |ip|
|
14
10
|
ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
15
11
|
guestpath: opts[:guestpath],
|
@@ -6,10 +6,6 @@ module VagrantPlugins
|
|
6
6
|
|
7
7
|
def self.nfs_unmount(environment, ui, folders)
|
8
8
|
folders.each do |name, opts|
|
9
|
-
if opts[:type] != :nfs_guest
|
10
|
-
next
|
11
|
-
end
|
12
|
-
|
13
9
|
ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
14
10
|
guestpath: opts[:guestpath],
|
15
11
|
hostpath: opts[:hostpath]))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-nfs_guest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Garfield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|