From be2643d40d68c1db650175017ce8e770ce4da101 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 10 Feb 2015 18:11:39 +0000 Subject: [PATCH] Only add user to docker group if docker group exists (doesn't in recent Fedora docker-io installs) --- .../docker/cap/linux/docker_configure_vagrant_user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/provisioners/docker/cap/linux/docker_configure_vagrant_user.rb b/plugins/provisioners/docker/cap/linux/docker_configure_vagrant_user.rb index 7a3d87e94..5283a9ef1 100644 --- a/plugins/provisioners/docker/cap/linux/docker_configure_vagrant_user.rb +++ b/plugins/provisioners/docker/cap/linux/docker_configure_vagrant_user.rb @@ -7,7 +7,7 @@ module VagrantPlugins ssh_info = machine.ssh_info machine.communicate.tap do |comm| - if !comm.test("id -Gn | grep docker") + if comm.test("getent group docker") && !comm.test("id -Gn | grep docker") comm.sudo("usermod -a -G docker #{ssh_info[:username]}") end end