2013-11-26 21:48:51 +00:00
|
|
|
module VagrantPlugins
|
2014-03-26 23:32:31 +00:00
|
|
|
module DockerProvisioner
|
2013-11-26 21:48:51 +00:00
|
|
|
module Cap
|
2013-12-14 00:32:15 +00:00
|
|
|
module Linux
|
2013-11-26 21:48:51 +00:00
|
|
|
module DockerConfigureVagrantUser
|
|
|
|
def self.docker_configure_vagrant_user(machine)
|
2014-01-16 18:34:08 +00:00
|
|
|
ssh_info = machine.ssh_info
|
|
|
|
|
|
|
|
machine.communicate.tap do |comm|
|
|
|
|
if !comm.test("id -Gn | grep docker")
|
|
|
|
comm.sudo("usermod -a -G docker #{ssh_info[:username]}")
|
|
|
|
end
|
|
|
|
end
|
2013-11-26 21:48:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|