Class: Vagrant::Butcher::Action::CopyGuestKey
- Inherits:
-
Object
- Object
- Vagrant::Butcher::Action::CopyGuestKey
- Includes:
- Helpers::Action, Helpers::KeyFiles
- Defined in:
- lib/vagrant-butcher/action/copy_guest_key.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ CopyGuestKey
constructor
A new instance of CopyGuestKey.
Methods included from Helpers::KeyFiles
#cache_dir, #cleanup_cache_dir, #client_key_path, #copy_guest_key, #create_cache_dir, #grab_key_from_guest, #guest_key_path, #key_filename
Methods included from Helpers::Guest
#get_guest_key_path, #windows?
Methods included from Helpers::Action
Methods included from Helpers::Config
#butcher_config, #chef_client?, #chef_provisioner, #client_name, #victim, #vm_config
Constructor Details
#initialize(app, env) ⇒ CopyGuestKey
Returns a new instance of CopyGuestKey.
8 9 10 |
# File 'lib/vagrant-butcher/action/copy_guest_key.rb', line 8 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/vagrant-butcher/action/copy_guest_key.rb', line 12 def call(env) begin @app.call(env) ensure copy_guest_key(env) if chef_client?(env) end end |