lib/ogre/base.rb in ogre-0.1.5 vs lib/ogre/base.rb in ogre-0.1.6
- old
+ new
@@ -11,11 +11,11 @@
class_option :run_as, type: :string, desc: DESC_RUN_AS
class_option :key_path, type: :string, desc: DESC_PRIVATE_KEY
# Parameters passed in from cli will take precedence
def chef_rest
- Chef::REST.new(options[:server_url] || Config.options[:server_url],
- options[:run_as] || Config.options[:run_as],
- options[:key_path] || Config.options[:key_path])
+ Chef::Config.node_name = options[:run_as] || Config.options[:run_as]
+ Chef::Config.client_key = options[:key_path] || Config.options[:key_path]
+ Chef::ServerAPI.new(options[:server_url] || Config.options[:server_url])
end
end
end