In a shell provisioner, I create a new group and then add the vagrant user to the new group:
config.vm.provision "shell", privileged: true, inline: <<-SHELL
groupadd --force cvs
usermod -a -G cvs vagrant
SHELL
In another shell provisioner, I need the vagrant user to belong to the 'cvs' group because a program that runs checks for it (something like this):
if `groups` =~ /cvs/ ...
but because Vagrant runs all provisioners through the same ssh connection to the vm, the changes haven't taken effect yet. If I log into the VM from another shell session, the group is present of course.
How can I make Vagrant "reload" or "restart" this shell without a full VM restart so that subsequent provisioners will see the changes to the vagrant user's groups?
Scott