synced_folders/nfs: allow plugins to provide valid NFS ids
This commit is contained in:
parent
2c65d247da
commit
d80f32c20f
|
@ -52,10 +52,13 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
def cleanup(machine, opts)
|
def cleanup(machine, opts)
|
||||||
|
ids = opts[:nfs_valid_ids]
|
||||||
|
if !ids
|
||||||
# Get the ID of all active machines.
|
# Get the ID of all active machines.
|
||||||
ids = machine.env.active_machines.map do |name, provider|
|
ids = machine.env.active_machines.map do |name, provider|
|
||||||
machine.env.machine(name, provider).id
|
machine.env.machine(name, provider).id
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Prune any of the unused machines
|
# Prune any of the unused machines
|
||||||
machine.env.host.nfs_prune(ids)
|
machine.env.host.nfs_prune(ids)
|
||||||
|
|
Loading…
Reference in New Issue