k8s: Add "vagrant" user to "docker" group in virtual environment
Node customization scripts do that for "ubuntu" user only (added by
default on OpenStack images). Vagrant boxes use "vagrant" user [1]
instead.
[1] https://www.vagrantup.com/docs/boxes/base.html#quot-vagrant-quot-user
Issue-ID: SECCOM-235
Change-Id: Ic4f832aa9a37230503e3c5bd29f8ae5fcd3883db
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 dc55809..abef9f8 100644
--- a/test/security/k8s/vagrant/dublin/Vagrantfile
+++ b/test/security/k8s/vagrant/dublin/Vagrantfile
@@ -41,10 +41,12 @@
if machine[:name] == 'control'
config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-controlnode.sh"
+ config.vm.provision :shell, inline: "usermod -aG docker vagrant" # script above adds "ubuntu" user only
end
if machine[:name] == 'worker'
config.vm.provision :shell, path: "../../tools/dublin/imported/openstack-k8s-workernode.sh"
+ config.vm.provision :shell, inline: "usermod -aG docker vagrant" # script above adds "ubuntu" user only
end
if machine[:name] == 'operator'