Class: Chef::Config
- Inherits:
-
Object
- Object
- Chef::Config
- Extended by:
- Mixlib::Config
- Defined in:
- lib/chef/config.rb
Class Method Summary collapse
- .inspect ⇒ Object
-
.manage_secret_key ⇒ Object
- Manages the chef secret session key === Returns <newkey>
-
A new or retrieved session key.
Instance Method Summary collapse
-
#nil ⇒ Object
Daemonization Settings ## What user should Chef run as?.
Class Method Details
.inspect ⇒ Object
45 46 47 |
# File 'lib/chef/config.rb', line 45 def self.inspect configuration.inspect end |
.manage_secret_key ⇒ Object
Manages the chef secret session key
Returns
- <newkey>
-
A new or retrieved session key
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/chef/config.rb', line 32 def self.manage_secret_key newkey = nil if Chef::FileCache.has_key?("chef_server_cookie_id") newkey = Chef::FileCache.load("chef_server_cookie_id") else chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a newkey = "" 40.times { |i| newkey << chars[rand(chars.size-1)] } Chef::FileCache.store("chef_server_cookie_id", newkey) end newkey end |
Instance Method Details
#nil ⇒ Object
Daemonization Settings ## What user should Chef run as?
135 |
# File 'lib/chef/config.rb', line 135 user nil |