diff options
-rw-r--r-- | test/security/k8s/vagrant/dublin/Vagrantfile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile index 224cd9a11..f0dfbb519 100644 --- a/test/security/k8s/vagrant/dublin/Vagrantfile +++ b/test/security/k8s/vagrant/dublin/Vagrantfile @@ -5,6 +5,7 @@ host_ip = "192.168.121.1" 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 @@ $deploy_key = <<-SCRIPT 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 @@ Vagrant.configure('2') do |config| 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" |