When specifying NFS synced folders we need to use a symbol (fix GH-76)
This commit is contained in:
parent
4ffb47f838
commit
d823a97cb8
5 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@ BACKWARDS INCOMPATIBILITY:
|
||||||
- Automatic handling of multiple machine scoped cache dirs from versions
|
- Automatic handling of multiple machine scoped cache dirs from versions
|
||||||
prior to 0.3.0 of this plugin was removed.
|
prior to 0.3.0 of this plugin was removed.
|
||||||
- Support for `enable_nfs` has been deprecated and will be removed on 0.7.0,
|
- Support for `enable_nfs` has been deprecated and will be removed on 0.7.0,
|
||||||
please use `cache.synced_folder_opts = {type: 'nfs'}` instead.
|
please use `cache.synced_folder_opts = {type: :nfs}` instead.
|
||||||
|
|
||||||
FEATURES:
|
FEATURES:
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ Vagrant.configure("2") do |config|
|
||||||
# shared folders. This is also very useful for vagrant-libvirt if you want
|
# shared folders. This is also very useful for vagrant-libvirt if you want
|
||||||
# bi-directional sync
|
# bi-directional sync
|
||||||
config.cache.synced_folder_opts = {
|
config.cache.synced_folder_opts = {
|
||||||
type: 'nfs',
|
type: :nfs,
|
||||||
# The nolock option can be useful for an NFSv3 client that wants to avoid the
|
# The nolock option can be useful for an NFSv3 client that wants to avoid the
|
||||||
# NLM sideband protocol. Without this option, apt-get might hang if it tries
|
# NLM sideband protocol. Without this option, apt-get might hang if it tries
|
||||||
# to lock files needed for /var/cache/* operations. All of this can be avoided
|
# to lock files needed for /var/cache/* operations. All of this can be avoided
|
||||||
|
|
|
@ -35,7 +35,7 @@ Vagrant.configure("2") do |config|
|
||||||
# shared folders. This is also very useful for vagrant-libvirt if you want
|
# shared folders. This is also very useful for vagrant-libvirt if you want
|
||||||
# bi-directional sync
|
# bi-directional sync
|
||||||
config.cache.synced_folder_opts = {
|
config.cache.synced_folder_opts = {
|
||||||
type: 'nfs',
|
type: :nfs,
|
||||||
# The nolock option can be useful for an NFSv3 client that wants to avoid the
|
# The nolock option can be useful for an NFSv3 client that wants to avoid the
|
||||||
# NLM sideband protocol. Without this option, apt-get might hang if it tries
|
# NLM sideband protocol. Without this option, apt-get might hang if it tries
|
||||||
# to lock files needed for /var/cache/* operations. All of this can be avoided
|
# to lock files needed for /var/cache/* operations. All of this can be avoided
|
||||||
|
|
|
@ -6,7 +6,7 @@ This is the easiest way to get started with plugin. By adding the code below to
|
||||||
your `Vagrantfile` you can enable automatic detection of supported cache _buckets_.
|
your `Vagrantfile` you can enable automatic detection of supported cache _buckets_.
|
||||||
It is a good practice to wrap plugin specific configuration with `has_plugin?` checks
|
It is a good practice to wrap plugin specific configuration with `has_plugin?` checks
|
||||||
so the user's Vagrantfiles do not break if vagrant-cachier is uninstalled or
|
so the user's Vagrantfiles do not break if vagrant-cachier is uninstalled or
|
||||||
the Vagrantfile is shared with people that do not have the plugin installed.
|
the Vagrantfile is shared with people that don't have the plugin installed.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
@ -44,7 +44,7 @@ VirtualBox and want to enable NFS for improved performance:
|
||||||
```ruby
|
```ruby
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.cache.synced_folder_opts = {
|
config.cache.synced_folder_opts = {
|
||||||
type: 'nfs',
|
type: :nfs,
|
||||||
# The nolock option can be useful for an NFSv3 client that wants to avoid the
|
# The nolock option can be useful for an NFSv3 client that wants to avoid the
|
||||||
# NLM sideband protocol. Without this option, apt-get might hang if it tries
|
# NLM sideband protocol. Without this option, apt-get might hang if it tries
|
||||||
# to lock files needed for /var/cache/* operations. All of this can be avoided
|
# to lock files needed for /var/cache/* operations. All of this can be avoided
|
||||||
|
|
|
@ -21,9 +21,9 @@ module VagrantPlugins
|
||||||
# TODO: Show warning!!!
|
# TODO: Show warning!!!
|
||||||
@ui.warn "The `enable_nfs` config for vagrant-cachier has been deprecated " \
|
@ui.warn "The `enable_nfs` config for vagrant-cachier has been deprecated " \
|
||||||
"and will be removed on 0.7.0, please use " \
|
"and will be removed on 0.7.0, please use " \
|
||||||
"`synced_folder_opts = { type: 'nfs' }` instead.\n"
|
"`synced_folder_opts = { type: :nfs }` instead.\n"
|
||||||
|
|
||||||
@synced_folder_opts = { type: 'nfs', nfs: true } if value
|
@synced_folder_opts = { type: :nfs } if value
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate(machine)
|
def validate(machine)
|
||||||
|
|
Loading…
Reference in a new issue