Class: SSHKeygen::Provider

Inherits:
Chef::Provider
  • Object
show all
Includes:
Poise, SSHKeygenProvider
Defined in:
lib/ssh_keygen.rb

Overview

provider class for ssh_keygen resource

Instance Method Summary collapse

Methods included from SSHKeygenProvider

#create_key, #save_private_key, #save_public_key, #update_directory_permissions

Instance Method Details

#action_createObject



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/ssh_keygen.rb', line 46

def action_create
  # load_sshkey_gem
  notifying_block do
    unless ::File.exist?(@new_resource.path)
      create_key
      save_private_key
      save_public_key
      update_directory_permissions
      new_resource.updated_by_last_action(true)
    end
  end
end