k8s: Extract hardcoded synced folder for dotfiles

Issue-ID: SECCOM-235
Change-Id: I85efb88476cb1d6bfaee44b6bcd6275477e77ba5
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile
index 224cd9a..f0dfbb5 100644
--- a/test/security/k8s/vagrant/dublin/Vagrantfile
+++ b/test/security/k8s/vagrant/dublin/Vagrantfile
@@ -5,6 +5,7 @@
 operator_key = "${HOME}/.ssh/onap-key"
 vagrant_user = "vagrant"
 vagrant_password = "vagrant"
+synced_folder = "/vagrant"
 
 vm_memory = 2 * 1024
 vm_cpus = 1
@@ -55,7 +56,8 @@
 SCRIPT
 
 $link_dotfiles = <<-SCRIPT
-  for rc in /vagrant/dot_*; do
+  SYNC_DIR="$1"
+  for rc in ${SYNC_DIR}/dot_*; do
     src="$rc"
     dst="${HOME}/.${rc##*dot_}"
     echo "Symlinking ${src} to ${dst}"
@@ -94,10 +96,17 @@
       end
 
       if machine[:name] == 'operator'
-        config.vm.synced_folder "../../tools/config", "/vagrant", type: "rsync"
+        config.vm.synced_folder "../../tools/config", synced_folder, type: "rsync"
 
-        config.vm.provision "link_dotfiles_root", type: :shell, run: "always", inline: $link_dotfiles
-        config.vm.provision "link_dotfiles_user", type: :shell, run: "always", privileged: false, inline: $link_dotfiles
+        config.vm.provision "link_dotfiles_root", type: :shell, run: "always" do |s|
+          s.inline = $link_dotfiles
+          s.args = synced_folder
+        end
+        config.vm.provision "link_dotfiles_user", type: :shell, run: "always" do |s|
+          s.privileged = false
+          s.inline = $link_dotfiles
+          s.args = synced_folder
+        end
 
         config.vm.provision "get_rke", type: :shell, path: "../../tools/dublin/get_rke.sh"