From 63640ac2f6d4456eb07a91a9f16783c1b866e720 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Fri, 26 Jul 2019 14:22:03 +0200 Subject: k8s: Use named provisioners This not only makes testing easier, but also allows better control over VM provisioning after its creation. Issue-ID: SECCOM-235 Change-Id: I29ab3ed46976267e1043c2f61f56578f2c5d7a57 Signed-off-by: Pawel Wieczorek --- test/security/k8s/vagrant/dublin/Vagrantfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile index fb65e1aa2..224cd9a11 100644 --- a/test/security/k8s/vagrant/dublin/Vagrantfile +++ b/test/security/k8s/vagrant/dublin/Vagrantfile @@ -81,32 +81,32 @@ Vagrant.configure('2') do |config| end config.vm.network :private_network, ip: machine[:ip] - config.vm.provision :shell, run: "always", inline: $replace_dns, args: host_ip + config.vm.provision "replace_dns", type: :shell, run: "always", inline: $replace_dns, args: host_ip if machine[:name] == 'control' - config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-controlnode.sh" - config.vm.provision :shell, inline: $add_to_docker_group, args: vagrant_user + config.vm.provision "customize_control", type: :shell, path: "../../tools/dublin/imported/openstack-k8s-controlnode.sh" + config.vm.provision "fix_groups_control", type: :shell, inline: $add_to_docker_group, args: vagrant_user end if machine[:name] == 'worker' - config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-workernode.sh" - config.vm.provision :shell, inline: $add_to_docker_group, args: vagrant_user + config.vm.provision "customize_worker", type: :shell, path: "../../tools/dublin/imported/openstack-k8s-workernode.sh" + config.vm.provision "fix_group_worker", type: :shell, inline: $add_to_docker_group, args: vagrant_user end if machine[:name] == 'operator' config.vm.synced_folder "../../tools/config", "/vagrant", type: "rsync" - config.vm.provision :shell, run: "always", inline: $link_dotfiles - config.vm.provision :shell, run: "always", privileged: false, inline: $link_dotfiles + 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 :shell, path: "../../tools/dublin/get_rke.sh" + config.vm.provision "get_rke", type: :shell, path: "../../tools/dublin/get_rke.sh" - config.vm.provision :shell, inline: $install_sshpass - config.vm.provision :shell, privileged: false, inline: $generate_key, args: operator_key + config.vm.provision "install_sshpass", type: :shell, inline: $install_sshpass + config.vm.provision "generate_key", type: :shell, privileged: false, inline: $generate_key, args: operator_key ips = "" cluster.each { |node| ips << node[:ip] << " " } - config.vm.provision :shell do |s| + config.vm.provision "deploy_key", type: :shell do |s| s.privileged = false s.inline = $deploy_key s.args = [operator_key, vagrant_user, ips] -- cgit 1.2.3-korg