vagrant-nfs_guest 0.1.5 → 0.1.6
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/.ruby-version +1 -0
- data/README.md +23 -2
- data/example_box/Vagrantfile +2 -0
- data/lib/vagrant-nfs_guest/guests/debian/cap/nfs_server.rb +6 -4
- data/lib/vagrant-nfs_guest/guests/debian/plugin.rb +25 -0
- data/lib/vagrant-nfs_guest/guests/linux/cap/{nfs_export.rb → nfs_server.rb} +30 -27
- data/lib/vagrant-nfs_guest/guests/linux/plugin.rb +50 -0
- data/lib/vagrant-nfs_guest/guests/redhat/cap/nfs_server.rb +85 -0
- data/lib/vagrant-nfs_guest/guests/redhat/plugin.rb +35 -0
- data/lib/vagrant-nfs_guest/guests/ubuntu/plugin.rb +20 -0
- data/lib/vagrant-nfs_guest/hosts/bsd/plugin.rb +20 -0
- data/lib/vagrant-nfs_guest/hosts/linux/plugin.rb +20 -0
- data/lib/vagrant-nfs_guest/plugin.rb +7 -85
- data/lib/vagrant-nfs_guest/version.rb +1 -1
- data/templates/locales/en.yml +1 -0
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b022bd81cf93ac95afc707b0c94044647789904
|
4
|
+
data.tar.gz: 87b23dea2b7e0ca61a6caf4e1bd2a67738757c87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d37621eb12be33298fb653e73574dc660b5905a13110811cae4b30ce26f3f955f98c87a81de684874e8522dd865834fbef87aa32c0f903bb01e330536524415
|
7
|
+
data.tar.gz: 0a981af776678422a36a22ec892581b5e9b6874c62439733ec9a67b2c8602275eb8fbfc4a3a3fa5c6cc32c438318681ceeeb97646ee3cb15ab4f189c7549cc15
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.2.3
|
data/README.md
CHANGED
@@ -17,8 +17,18 @@ Allows a guest VM to export synced folders via NFS and the host to mount them.
|
|
17
17
|
|
18
18
|
Basically it's just the usual NFS synced folders in Vagrant but the roles are reversed.
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
Guest VMs we've tested include:
|
21
|
+
- Ubuntu (precise, trusty)
|
22
|
+
- CentOS (6.5, 6.6, 7)
|
23
|
+
- Debian (wheezy)
|
24
|
+
- other Linux based guests may work fine with the generic Linux support. But no guarantee
|
25
|
+
|
26
|
+
Hosts we've tested include:
|
27
|
+
- OSX (Mavericks, Yosemite, El Capitan)
|
28
|
+
- Ubuntu (precise, trusty)
|
29
|
+
- other Linux based OSs should work fine, but will need testing, again no guarantee
|
30
|
+
|
31
|
+
We're happy to receive pull-request to support alternatives hosts and guests. To implement this support it's relatively trivial if you look in ./lib/hosts and ./lib/guests.
|
22
32
|
|
23
33
|
## Installation
|
24
34
|
|
@@ -46,6 +56,17 @@ We use 'chruby' to allow a virtual ruby environment for developement. The 'bundl
|
|
46
56
|
cd vagrant-nfs_guest
|
47
57
|
bundle install
|
48
58
|
bundle exec vagrant
|
59
|
+
|
60
|
+
You can test your handy work using the ```example_box``` by doing the following:
|
61
|
+
cd ./example_box/
|
62
|
+
bundle exec vagrant up
|
63
|
+
|
64
|
+
You can ssh into the test VM using:
|
65
|
+
bundle exec vagrant ssh
|
66
|
+
|
67
|
+
... and you can clean up with:
|
68
|
+
bundle exec vagrant destroy
|
69
|
+
|
49
70
|
|
50
71
|
## Contributing
|
51
72
|
|
data/example_box/Vagrantfile
CHANGED
@@ -11,6 +11,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
11
11
|
|
12
12
|
# Every Vagrant virtual environment requires a box to build off of.
|
13
13
|
config.vm.box = "ubuntu/trusty64"
|
14
|
+
#config.vm.box = "centos/7"
|
15
|
+
#config.vm.box = "puphpet/centos65-x64"
|
14
16
|
|
15
17
|
# The url from where the 'config.vm.box' box will be fetched if it
|
16
18
|
# doesn't already exist on the user's system.
|
@@ -3,10 +3,6 @@ module VagrantPlugins
|
|
3
3
|
module GuestDebian
|
4
4
|
module Cap
|
5
5
|
class NFSServer
|
6
|
-
def self.nfs_test_command(env)
|
7
|
-
"test -x /usr/sbin/exportfs"
|
8
|
-
end
|
9
|
-
|
10
6
|
def self.nfs_server_install(machine)
|
11
7
|
machine.communicate.sudo("apt-get update")
|
12
8
|
machine.communicate.sudo("apt-get -y install nfs-kernel-server")
|
@@ -15,6 +11,12 @@ module VagrantPlugins
|
|
15
11
|
def self.nfs_server_installed(machine)
|
16
12
|
machine.communicate.test("test -e /etc/init.d/nfs-kernel-server")
|
17
13
|
end
|
14
|
+
|
15
|
+
def self.nfs_test_command(machine)
|
16
|
+
machine.communicate.test(
|
17
|
+
"test -x /usr/sbin/exportfs"
|
18
|
+
)
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SyncedFolderNFSGuest
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "Debian guest"
|
7
|
+
description "Debian guest support."
|
8
|
+
|
9
|
+
guest_capability(:debian, :nfs_test_command) do
|
10
|
+
require_relative "cap/nfs_server"
|
11
|
+
GuestDebian::Cap::NFSServer
|
12
|
+
end
|
13
|
+
|
14
|
+
guest_capability(:debian, :nfs_server_installed) do
|
15
|
+
require_relative "cap/nfs_server"
|
16
|
+
GuestDebian::Cap::NFSServer
|
17
|
+
end
|
18
|
+
|
19
|
+
guest_capability(:debian, :nfs_server_install) do
|
20
|
+
require_relative "cap/nfs_server"
|
21
|
+
GuestDebian::Cap::NFSServer
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -4,27 +4,35 @@ module VagrantPlugins
|
|
4
4
|
module SyncedFolderNFSGuest
|
5
5
|
module GuestLinux
|
6
6
|
module Cap
|
7
|
-
class
|
7
|
+
class NFSServer
|
8
8
|
extend Vagrant::Util::Retryable
|
9
9
|
|
10
|
-
def self.nfs_apply_command(
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
def self.nfs_apply_command(machine)
|
11
|
+
machine.communicate.sudo(
|
12
|
+
"exportfs -r",
|
13
|
+
error_class: Errors::GuestNFSError,
|
14
|
+
error_key: :nfs_apply_failed
|
15
|
+
)
|
16
16
|
end
|
17
17
|
|
18
|
-
def self.nfs_start_command(
|
19
|
-
|
18
|
+
def self.nfs_start_command(machine)
|
19
|
+
machine.communicate.sudo(
|
20
|
+
"/etc/init.d/nfs-kernel-server start",
|
21
|
+
error_class: Errors::GuestNFSError,
|
22
|
+
error_key: :nfs_start_failed
|
23
|
+
)
|
20
24
|
end
|
21
25
|
|
22
|
-
def self.nfs_check_command(
|
23
|
-
|
26
|
+
def self.nfs_check_command(machine)
|
27
|
+
machine.communicate.test(
|
28
|
+
"/etc/init.d/nfs-kernel-server status"
|
29
|
+
)
|
24
30
|
end
|
25
31
|
|
26
|
-
def self.nfs_test_command(
|
27
|
-
|
32
|
+
def self.nfs_test_command(machine)
|
33
|
+
machine.communicate.test(
|
34
|
+
"which exportfs"
|
35
|
+
)
|
28
36
|
end
|
29
37
|
|
30
38
|
def self.nfs_exports_template(machine)
|
@@ -33,29 +41,19 @@ module VagrantPlugins
|
|
33
41
|
end
|
34
42
|
|
35
43
|
def self.nfs_capable?(machine)
|
36
|
-
|
37
|
-
machine.communicate.test(nfs_test_command)
|
44
|
+
machine.guest.capability(:nfs_test_command)
|
38
45
|
end
|
39
46
|
|
40
47
|
def self.nfs_apply_changes!(machine)
|
41
|
-
|
42
|
-
machine.communicate.sudo(nfs_apply_command,
|
43
|
-
error_class: Errors::GuestNFSError,
|
44
|
-
error_key: :nfs_apply_failed
|
45
|
-
)
|
48
|
+
machine.guest.capability(:nfs_apply_command)
|
46
49
|
end
|
47
50
|
|
48
51
|
def self.nfs_start!(machine)
|
49
|
-
|
50
|
-
machine.communicate.sudo(nfs_start_command,
|
51
|
-
error_class: Errors::GuestNFSError,
|
52
|
-
error_key: :nfs_start_failed
|
53
|
-
)
|
52
|
+
machine.guest.capability(:nfs_start_command)
|
54
53
|
end
|
55
54
|
|
56
55
|
def self.nfs_running?(machine)
|
57
|
-
|
58
|
-
machine.communicate.test(nfs_test_command)
|
56
|
+
machine.guest.capability(:nfs_check_command)
|
59
57
|
end
|
60
58
|
|
61
59
|
def self.nfs_export(machine, ip, folders)
|
@@ -63,6 +61,11 @@ module VagrantPlugins
|
|
63
61
|
raise Errors::NFSServerMissing
|
64
62
|
end
|
65
63
|
|
64
|
+
if machine.guest.capability?(:nfs_setup_firewall)
|
65
|
+
machine.ui.info I18n.t("vagrant_nfs_guest.guests.linux.nfs_setup_firewall")
|
66
|
+
machine.guest.capability(:nfs_setup_firewall, ip)
|
67
|
+
end
|
68
|
+
|
66
69
|
nfs_exports_template = machine.guest.capability(:nfs_exports_template)
|
67
70
|
|
68
71
|
nfs_opts_setup(machine, folders)
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SyncedFolderNFSGuest
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "Linux guest."
|
7
|
+
description "Linux guest support."
|
8
|
+
|
9
|
+
guest_capability(:linux, :nfs_export) do
|
10
|
+
require_relative "cap/nfs_server"
|
11
|
+
GuestLinux::Cap::NFSServer
|
12
|
+
end
|
13
|
+
|
14
|
+
guest_capability(:linux, :nfs_apply_command) do
|
15
|
+
require_relative "cap/nfs_server"
|
16
|
+
GuestLinux::Cap::NFSServer
|
17
|
+
end
|
18
|
+
|
19
|
+
guest_capability(:linux, :nfs_check_command) do
|
20
|
+
require_relative "cap/nfs_server"
|
21
|
+
GuestLinux::Cap::NFSServer
|
22
|
+
end
|
23
|
+
|
24
|
+
guest_capability(:linux, :nfs_start_command) do
|
25
|
+
require_relative "cap/nfs_server"
|
26
|
+
GuestLinux::Cap::NFSServer
|
27
|
+
end
|
28
|
+
|
29
|
+
guest_capability(:linux, :nfs_test_command) do
|
30
|
+
require_relative "cap/nfs_server"
|
31
|
+
GuestLinux::Cap::NFSServer
|
32
|
+
end
|
33
|
+
|
34
|
+
guest_capability(:linux, :nfs_exports_template) do
|
35
|
+
require_relative "cap/nfs_server"
|
36
|
+
GuestLinux::Cap::NFSServer
|
37
|
+
end
|
38
|
+
|
39
|
+
guest_capability(:linux, :read_uid) do
|
40
|
+
require_relative "cap/read_user_ids"
|
41
|
+
GuestLinux::Cap::ReadUserIDs
|
42
|
+
end
|
43
|
+
|
44
|
+
guest_capability(:linux, :read_gid) do
|
45
|
+
require_relative "cap/read_user_ids"
|
46
|
+
GuestLinux::Cap::ReadUserIDs
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module SyncedFolderNFSGuest
|
3
|
+
module GuestRedHat
|
4
|
+
module Cap
|
5
|
+
class NFSServer
|
6
|
+
|
7
|
+
def self.systemd?(machine)
|
8
|
+
machine.communicate.test("test $(ps -o comm= 1) == 'systemd'")
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.nfs_server_install(machine)
|
12
|
+
machine.communicate.sudo("yum -y install nfs-utils nfs-utils-lib")
|
13
|
+
|
14
|
+
if systemd?(machine)
|
15
|
+
machine.communicate.sudo("systemctl enable rpcbind nfs-server")
|
16
|
+
else
|
17
|
+
machine.communicate.sudo("chkconfig nfs on")
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.nfs_setup_firewall(machine, ip)
|
23
|
+
if not systemd?(machine)
|
24
|
+
# centos 6.5 has iptables on by default is would seem
|
25
|
+
machine.communicate.sudo(
|
26
|
+
"sed -i \"s/#LOCKD_/LOCKD_/\" /etc/sysconfig/nfs"
|
27
|
+
)
|
28
|
+
machine.communicate.sudo(
|
29
|
+
"sed -i \"s/#MOUNTD_PORT/MOUNTD_PORT/\" /etc/sysconfig/nfs"
|
30
|
+
)
|
31
|
+
machine.communicate.sudo(
|
32
|
+
"iptables -I INPUT -m state --state NEW -p udp -m multiport " +
|
33
|
+
"--dport 111,892,2049,32803 -s #{ip}/32 -j ACCEPT"
|
34
|
+
)
|
35
|
+
machine.communicate.sudo(
|
36
|
+
"iptables -I INPUT -m state --state NEW -p tcp -m multiport " +
|
37
|
+
"--dport 111,892,2049,32803 -s #{ip}/32 -j ACCEPT"
|
38
|
+
)
|
39
|
+
|
40
|
+
nfs_start_command(machine)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.nfs_server_installed(machine)
|
45
|
+
if systemd?(machine)
|
46
|
+
machine.communicate.test("systemctl status nfs-server.service")
|
47
|
+
else
|
48
|
+
machine.communicate.test("service nfs status")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.nfs_check_command(machine)
|
53
|
+
if systemd?(machine)
|
54
|
+
machine.communicate.test(
|
55
|
+
"systemctl status rpcbind nfs-server"
|
56
|
+
)
|
57
|
+
else
|
58
|
+
machine.communicate.test(
|
59
|
+
"service nfs status"
|
60
|
+
)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.nfs_start_command(machine)
|
65
|
+
if systemd?(machine)
|
66
|
+
machine.communicate.sudo(
|
67
|
+
"systemctl start rpcbind nfs-server",
|
68
|
+
error_class: Errors::GuestNFSError,
|
69
|
+
error_key: :nfs_start_failed
|
70
|
+
)
|
71
|
+
else
|
72
|
+
['rpcbind', 'nfs'].each do |i|
|
73
|
+
machine.communicate.sudo(
|
74
|
+
"service #{i} restart",
|
75
|
+
error_class: Errors::GuestNFSError,
|
76
|
+
error_key: :nfs_start_failed
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SyncedFolderNFSGuest
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "Red Hat Enterprise Linux guest"
|
7
|
+
description "Red Hat Enterprise Linux guest support."
|
8
|
+
|
9
|
+
guest_capability(:redhat, :nfs_server_installed) do
|
10
|
+
require_relative "cap/nfs_server"
|
11
|
+
GuestRedHat::Cap::NFSServer
|
12
|
+
end
|
13
|
+
|
14
|
+
guest_capability(:redhat, :nfs_server_install) do
|
15
|
+
require_relative "cap/nfs_server"
|
16
|
+
GuestRedHat::Cap::NFSServer
|
17
|
+
end
|
18
|
+
|
19
|
+
guest_capability(:redhat, :nfs_check_command) do
|
20
|
+
require_relative "cap/nfs_server"
|
21
|
+
GuestRedHat::Cap::NFSServer
|
22
|
+
end
|
23
|
+
|
24
|
+
guest_capability(:redhat, :nfs_start_command) do
|
25
|
+
require_relative "cap/nfs_server"
|
26
|
+
GuestRedHat::Cap::NFSServer
|
27
|
+
end
|
28
|
+
|
29
|
+
guest_capability(:redhat, :nfs_setup_firewall) do
|
30
|
+
require_relative "cap/nfs_server"
|
31
|
+
GuestRedHat::Cap::NFSServer
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SyncedFolderNFSGuest
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "Ubuntu guest"
|
7
|
+
description "Ubuntu guest support."
|
8
|
+
|
9
|
+
guest_capability(:ubuntu, :nfs_server_installed) do
|
10
|
+
require_relative "cap/nfs_server"
|
11
|
+
GuestUbuntu::Cap::NFSServer
|
12
|
+
end
|
13
|
+
|
14
|
+
guest_capability(:ubuntu, :nfs_server_install) do
|
15
|
+
require_relative "cap/nfs_server"
|
16
|
+
GuestUbuntu::Cap::NFSServer
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SyncedFolderNFSGuest
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "BSD host"
|
7
|
+
description "BSD host support."
|
8
|
+
|
9
|
+
host_capability("bsd", "nfs_mount") do
|
10
|
+
require_relative "cap/mount_nfs"
|
11
|
+
HostBSD::Cap::MountNFS
|
12
|
+
end
|
13
|
+
|
14
|
+
host_capability("bsd", "nfs_unmount") do
|
15
|
+
require_relative "cap/unmount_nfs"
|
16
|
+
HostBSD::Cap::UnmountNFS
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "vagrant"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SyncedFolderNFSGuest
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name "Linux host"
|
7
|
+
description "Linux host support."
|
8
|
+
|
9
|
+
host_capability(:linux, "nfs_mount") do
|
10
|
+
require_relative "cap/mount_nfs"
|
11
|
+
HostLinux::Cap::MountNFS
|
12
|
+
end
|
13
|
+
|
14
|
+
host_capability(:linux, "nfs_unmount") do
|
15
|
+
require_relative "cap/unmount_nfs"
|
16
|
+
HostLinux::Cap::UnmountNFS
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -10,6 +10,13 @@ if Vagrant::VERSION < "1.2.0"
|
|
10
10
|
raise "The Vagrant NFS Guest plugin is only compatible with Vagrant 1.2+"
|
11
11
|
end
|
12
12
|
|
13
|
+
require_relative "guests/debian/plugin"
|
14
|
+
require_relative "guests/linux/plugin"
|
15
|
+
require_relative "guests/redhat/plugin"
|
16
|
+
require_relative "guests/ubuntu/plugin"
|
17
|
+
require_relative "hosts/bsd/plugin"
|
18
|
+
require_relative "hosts/linux/plugin"
|
19
|
+
|
13
20
|
module VagrantPlugins
|
14
21
|
module SyncedFolderNFSGuest
|
15
22
|
# This plugin implements Guest Exported NFS folders.
|
@@ -33,91 +40,6 @@ module VagrantPlugins
|
|
33
40
|
SyncedFolder
|
34
41
|
end
|
35
42
|
|
36
|
-
guest_capability(:linux, :nfs_export) do
|
37
|
-
require_relative "guests/linux/cap/nfs_export"
|
38
|
-
GuestLinux::Cap::NFSExport
|
39
|
-
end
|
40
|
-
|
41
|
-
guest_capability(:linux, :nfs_apply_command) do
|
42
|
-
require_relative "guests/linux/cap/nfs_export"
|
43
|
-
GuestLinux::Cap::NFSExport
|
44
|
-
end
|
45
|
-
|
46
|
-
guest_capability(:linux, :nfs_check_command) do
|
47
|
-
require_relative "guests/linux/cap/nfs_export"
|
48
|
-
GuestLinux::Cap::NFSExport
|
49
|
-
end
|
50
|
-
|
51
|
-
guest_capability(:linux, :nfs_start_command) do
|
52
|
-
require_relative "guests/linux/cap/nfs_export"
|
53
|
-
GuestLinux::Cap::NFSExport
|
54
|
-
end
|
55
|
-
|
56
|
-
guest_capability(:linux, :nfs_test_command) do
|
57
|
-
require_relative "guests/linux/cap/nfs_export"
|
58
|
-
GuestLinux::Cap::NFSExport
|
59
|
-
end
|
60
|
-
|
61
|
-
guest_capability(:linux, :nfs_exports_template) do
|
62
|
-
require_relative "guests/linux/cap/nfs_export"
|
63
|
-
GuestLinux::Cap::NFSExport
|
64
|
-
end
|
65
|
-
|
66
|
-
guest_capability(:debian, :nfs_test_command) do
|
67
|
-
require_relative "guests/debian/cap/nfs_server"
|
68
|
-
GuestDebian::Cap::NFSServer
|
69
|
-
end
|
70
|
-
|
71
|
-
guest_capability(:debian, "nfs_server_installed") do
|
72
|
-
require_relative "guests/debian/cap/nfs_server"
|
73
|
-
GuestDebian::Cap::NFSServer
|
74
|
-
end
|
75
|
-
|
76
|
-
guest_capability(:debian, :nfs_server_install) do
|
77
|
-
require_relative "guests/debian/cap/nfs_server"
|
78
|
-
GuestDebian::Cap::NFSServer
|
79
|
-
end
|
80
|
-
|
81
|
-
guest_capability(:ubuntu, "nfs_server_installed") do
|
82
|
-
require_relative "guests/ubuntu/cap/nfs_server"
|
83
|
-
GuestUbuntu::Cap::NFSServer
|
84
|
-
end
|
85
|
-
|
86
|
-
guest_capability(:ubuntu, :nfs_server_install) do
|
87
|
-
require_relative "guests/ubuntu/cap/nfs_server"
|
88
|
-
GuestUbuntu::Cap::NFSServer
|
89
|
-
end
|
90
|
-
|
91
|
-
guest_capability(:linux, :read_uid) do
|
92
|
-
require_relative "guests/linux/cap/read_user_ids"
|
93
|
-
GuestLinux::Cap::ReadUserIDs
|
94
|
-
end
|
95
|
-
|
96
|
-
guest_capability(:linux, :read_gid) do
|
97
|
-
require_relative "guests/linux/cap/read_user_ids"
|
98
|
-
GuestLinux::Cap::ReadUserIDs
|
99
|
-
end
|
100
|
-
|
101
|
-
host_capability("bsd", "nfs_mount") do
|
102
|
-
require_relative "hosts/bsd/cap/mount_nfs"
|
103
|
-
HostBSD::Cap::MountNFS
|
104
|
-
end
|
105
|
-
|
106
|
-
host_capability("bsd", "nfs_unmount") do
|
107
|
-
require_relative "hosts/bsd/cap/unmount_nfs"
|
108
|
-
HostBSD::Cap::UnmountNFS
|
109
|
-
end
|
110
|
-
|
111
|
-
host_capability(:linux, "nfs_mount") do
|
112
|
-
require_relative "hosts/linux/cap/mount_nfs"
|
113
|
-
HostLinux::Cap::MountNFS
|
114
|
-
end
|
115
|
-
|
116
|
-
host_capability(:linux, "nfs_unmount") do
|
117
|
-
require_relative "hosts/linux/cap/unmount_nfs"
|
118
|
-
HostLinux::Cap::UnmountNFS
|
119
|
-
end
|
120
|
-
|
121
43
|
action_hook(:nfs_guest, :machine_action_up) do |hook|
|
122
44
|
require_relative "action/prepare_nfs_guest_settings"
|
123
45
|
hook.after(
|
data/templates/locales/en.yml
CHANGED
@@ -10,6 +10,7 @@ en:
|
|
10
10
|
linux:
|
11
11
|
nfs_export: "Preparing to edit /etc/exports on the guest..."
|
12
12
|
nfs_server_installing: "Installing nfs server on the guest..."
|
13
|
+
nfs_setup_firewall: "Setup firewall on the guest to allow NFS exports..."
|
13
14
|
|
14
15
|
errors:
|
15
16
|
nfs_update_exports_failed: |-
|
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.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Garfield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -46,6 +46,7 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
|
+
- ".ruby-version"
|
49
50
|
- Gemfile
|
50
51
|
- LICENSE.txt
|
51
52
|
- README.md
|
@@ -59,13 +60,20 @@ files:
|
|
59
60
|
- lib/vagrant-nfs_guest/config.rb
|
60
61
|
- lib/vagrant-nfs_guest/errors.rb
|
61
62
|
- lib/vagrant-nfs_guest/guests/debian/cap/nfs_server.rb
|
62
|
-
- lib/vagrant-nfs_guest/guests/
|
63
|
+
- lib/vagrant-nfs_guest/guests/debian/plugin.rb
|
64
|
+
- lib/vagrant-nfs_guest/guests/linux/cap/nfs_server.rb
|
63
65
|
- lib/vagrant-nfs_guest/guests/linux/cap/read_user_ids.rb
|
66
|
+
- lib/vagrant-nfs_guest/guests/linux/plugin.rb
|
67
|
+
- lib/vagrant-nfs_guest/guests/redhat/cap/nfs_server.rb
|
68
|
+
- lib/vagrant-nfs_guest/guests/redhat/plugin.rb
|
64
69
|
- lib/vagrant-nfs_guest/guests/ubuntu/cap/nfs_server.rb
|
70
|
+
- lib/vagrant-nfs_guest/guests/ubuntu/plugin.rb
|
65
71
|
- lib/vagrant-nfs_guest/hosts/bsd/cap/mount_nfs.rb
|
66
72
|
- lib/vagrant-nfs_guest/hosts/bsd/cap/unmount_nfs.rb
|
73
|
+
- lib/vagrant-nfs_guest/hosts/bsd/plugin.rb
|
67
74
|
- lib/vagrant-nfs_guest/hosts/linux/cap/mount_nfs.rb
|
68
75
|
- lib/vagrant-nfs_guest/hosts/linux/cap/unmount_nfs.rb
|
76
|
+
- lib/vagrant-nfs_guest/hosts/linux/plugin.rb
|
69
77
|
- lib/vagrant-nfs_guest/plugin.rb
|
70
78
|
- lib/vagrant-nfs_guest/synced_folder.rb
|
71
79
|
- lib/vagrant-nfs_guest/version.rb
|
@@ -92,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
100
|
version: '0'
|
93
101
|
requirements: []
|
94
102
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.4.5.1
|
96
104
|
signing_key:
|
97
105
|
specification_version: 4
|
98
106
|
summary: Adds support for guest nfs exporting of synced folders
|