Sha256: a7505ca8f7f6fd79fdf46614da82006ab9b5aaaab57bec6a3244101b6f546517

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 Bytes

Contents

module VagrantPlugins
  module DockerProvisioner
    module Cap
      module Linux
        module DockerConfigureVagrantUser
          def self.docker_configure_vagrant_user(machine)
            ssh_info = machine.ssh_info

            machine.communicate.tap do |comm|
              if comm.test("getent group docker") && !comm.test("id -Gn | grep docker")
                comm.sudo("usermod -a -G docker #{ssh_info[:username]}")
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/provisioners/docker/cap/linux/docker_configure_vagrant_user.rb