Created
February 16, 2015 01:10
-
-
Save mAAdhaTTah/c632023b468f24dd215a to your computer and use it in GitHub Desktop.
Sync additional paths in Bedrock-Ansible's Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sync additional paths | |
extra_paths = [ | |
['../../../plugins/wp-gistpen', File.join(bedrock_path_server, 'web/app/plugins/wp-gistpen')] | |
] | |
extra_paths.each do |paths| | |
extra_path = paths[0] | |
extra_path_server = paths[1] | |
initial_mount = File.join('/wptmp', File.basename(extra_path)) | |
if Vagrant::Util::Platform.windows? | |
config.vm.synced_folder extra_path, extra_path_server, owner: 'vagrant', group: 'www-data', mount_options: ['dmode=776', 'fmode=775'] | |
else | |
if !Vagrant.has_plugin? 'vagrant-bindfs' | |
raise Vagrant::Errors::VagrantError.new, | |
"vagrant-bindfs missing, please install the plugin:\nvagrant plugin install vagrant-bindfs" | |
else | |
config.vm.synced_folder extra_path, initial_mount, type: 'nfs' | |
config.bindfs.bind_folder initial_mount, extra_path_server, u: 'vagrant', g: 'www-data' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment