diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2019-07-26 14:38:54 +0200 |
---|---|---|
committer | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2019-07-26 14:42:17 +0200 |
commit | eb166a53ceb3e6f0f2b6a41c432fe3baa7d24d53 (patch) | |
tree | 2563acf927bb937c02be866f3676f065276922f6 /test/security/k8s/vagrant/dublin | |
parent | 63640ac2f6d4456eb07a91a9f16783c1b866e720 (diff) |
k8s: Extract hardcoded synced folder for dotfiles
Issue-ID: SECCOM-235
Change-Id: I85efb88476cb1d6bfaee44b6bcd6275477e77ba5
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/k8s/vagrant/dublin')
-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" |