@@ -41,6 +41,7 @@ VagrantApp::Config.option(:varnish, false) # If varnish needs to be enabled
4141 . option ( :unison_guest , 'project' ) # Directory for project code
4242 . option ( :unison_ignore , 'Name {.DS_Store,.git}' ) # Unison ignore pattern
4343 . option ( :unison_manage_permissions , false ) # Unison manage permissions
44+ . option ( :unison , mount_plugin == 'vagrant-unison2' ) # Unison plugin installation
4445 . option ( :network , '33.33.33.0/24' ) # Directory to be used as mount on host machine
4546
4647Vagrant . configure ( "2" ) do |config |
@@ -60,6 +61,7 @@ Vagrant.configure("2") do |config|
6061 . shell_add ( 'magento2-install.sh' , [ :magento2 , :install ] ) # M2 Installer, depends on :magento2 and :install
6162 . shell_add ( 'magento2-developer.sh' , [ :magento2 , :install , :developer ] ) # M2 Developer options, depends on :magento2, :install, :developer
6263 . shell_add ( 'shell.sh' , :shell ) # Fish shell installer, depends on :shell flag
64+ . shell_add ( 'unison.sh' , :unison )
6365 . shell_add ( 'hello.sh' ) # Final message with connection instructions
6466
6567 # Loads config.rb from the same directory where Vagrantfile is in
@@ -94,7 +96,7 @@ Vagrant.configure("2") do |config|
9496 # Disable default /vagrant mount as we use custom user for box
9597 config . vm . synced_folder '.' , '/vagrant/' , disabled : true
9698
97- if mount_plugin == 'vagrant_nfs-guest'
99+ unless box_config . flag? ( :unison )
98100 project_dir = 'magento2'
99101 else
100102 project_dir = box_config . get ( :unison_guest )
@@ -110,7 +112,7 @@ Vagrant.configure("2") do |config|
110112 VAGRANT_FPM_SERVICE : box_config . flag? ( :php7 ) ? 'php7.0-fpm' : 'php5-fpm' ,
111113 VAGRNAT_PHP_ETC_DIR : box_config . flag? ( :php7 ) ? '/etc/php/7.0/' : '/etc/php5/' ,
112114 VAGRNAT_PHP_PACKAGE_PREFIX : box_config . flag? ( :php7 ) ? 'php7.0' : 'php5' ,
113- VAGRANT_PROJECT_DIR : box_config . get ( :unison_guest )
115+ VAGRANT_PROJECT_DIR : project_dir
114116 }
115117 end
116118
@@ -125,7 +127,7 @@ Vagrant.configure("2") do |config|
125127 node . hostmanager . aliases = box_config . get ( :domains )
126128
127129
128- if mount_plugin == 'vagrant_nfs-guest'
130+ unless box_config . get ( :unison )
129131 node . vm . synced_folder box_config . get ( :directory ) , '/data/web' , type : 'nfs_guest' , create : true ,
130132 linux__nfs_options : %w( rw no_subtree_check all_squash insecure async ) ,
131133 map_uid : box_config . get ( :uid ) . to_s ,
0 commit comments