Only add user to docker group if docker group exists (doesn't in recent Fedora docker-io installs)

This commit is contained in:
Jimmi Dyson 2015-02-10 18:11:39 +00:00
parent a755cf285a
commit be2643d40d
1 changed files with 1 additions and 1 deletions

View File

@ -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