Weidong Shao 8feb56ce06 Merge openssh cookbook from OpenDeployment
Note that this merge may break things. The change from OpenDeployment
is subject to further review at a later time. The change introduces
openstack specific logic in an otherwise independent openssh recipe.

Change-Id: I568e4d2329a1d0e2670e1b0340afca4dddf4f23a
2014-09-03 06:50:33 +00:00

15 lines
771 B
Ruby

actions :create, :allow, :copy
attribute :role, :kind_of => String, :name_attribute => true
attribute :username, :kind_of => String, :default => `whoami`.delete("\n")
attribute :home, :kind_of => String, :default => `eval echo ~${SUDO_USER}`.delete("\n")
attribute :port, :kind_of => Integer, :default => 22
attribute :private_key, :kind_of => String, :default => `eval echo ~${SUDO_USER}`.delete("\n") + "/.ssh/id_rsa"
attribute :public_key, :kind_of => String, :default => `eval echo ~${SUDO_USER}`.delete("\n") + "/.ssh/id_rsa.pub"
attribute :authorized_key, :kind_of => String, :default => `eval echo ~${SUDO_USER}`.delete("\n") + "/.ssh/authorized_keys"
def initialize(*args)
super
@action = :create
end