Sha256: eae9960f36d8878a8665fd945b8a7f5a1a836d6f70381523c40b7f042d8e366e

Contents?: true

Size: 1009 Bytes

Versions: 21

Compression:

Stored size: 1009 Bytes

Contents

# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
module VagrantPlugins
  module Google
    module Action
      class WarnSshKeys
        def initialize(app, env)
          @app = app
        end

        def call(env)
          # Warn on ssh-key overrides
          if env[:machine].config.ssh.username.nil?
            env[:ui].warn(I18n.t("vagrant_google.warn_ssh_vagrant_user"))
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
vagrant-google-2.7.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.6.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.5.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.4.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.4.0.rc0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.3.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.3.0.rc0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.2.1 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.2.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.2.0.rc0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.1.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.0.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.0.0.rc1 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-2.0.0.rc0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-1.0.0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-1.0.0.rc0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-0.2.5 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-0.2.5.rc0 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-0.2.4 lib/vagrant-google/action/warn_ssh_keys.rb
vagrant-google-0.2.3 lib/vagrant-google/action/warn_ssh_keys.rb