Class: Chef::EncryptedAttribute::LocalNode
- Inherits:
-
Object
- Object
- Chef::EncryptedAttribute::LocalNode
- Defined in:
- lib/chef/encrypted_attribute/local_node.rb
Overview
Get name and keys from local Chef Node.
Instance Method Summary collapse
-
#key ⇒ OpenSSL::PKey::RSA
Gets the local node key.
-
#name ⇒ String
Gets the local node name.
-
#public_key ⇒ OpenSSL::PKey::RSA
Gets the local node public key.
Instance Method Details
#key ⇒ OpenSSL::PKey::RSA
Gets the local node key.
The key has the private key and the public key embedded.
37 38 39 |
# File 'lib/chef/encrypted_attribute/local_node.rb', line 37 def key OpenSSL::PKey::RSA.new(open(Chef::Config[:client_key]).read) end |
#name ⇒ String
Note:
currently not used
Gets the local node name.
28 29 30 |
# File 'lib/chef/encrypted_attribute/local_node.rb', line 28 def name Chef::Config[:node_name] end |
#public_key ⇒ OpenSSL::PKey::RSA
Gets the local node public key.
44 45 46 |
# File 'lib/chef/encrypted_attribute/local_node.rb', line 44 def public_key key.public_key end |