Class: Ogre::Base
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Ogre::Base
- Includes:
- Thor::Actions
- Defined in:
- lib/ogre/base.rb
Overview
Base ogre class includes common parameters used to authenticate with Chef::REST
Direct Known Subclasses
Associate, OrgCreate, OrgDelete, OrgList, OrgShow, UserCreate, UserDelete, UserList
Instance Method Summary collapse
-
#chef_rest ⇒ Object
Parameters passed in from cli will take precedence.
Instance Method Details
#chef_rest ⇒ Object
Parameters passed in from cli will take precedence
15 16 17 18 19 20 |
# File 'lib/ogre/base.rb', line 15 def chef_rest Chef::Config.node_name = [:run_as] || Config.[:run_as] Chef::Config.client_key = [:key_path] || Config.[:key_path] if Config.[:ssl_verify_mode] == 'false' then Chef::Config.ssl_verify_mode = :verify_none end Chef::ServerAPI.new([:server_url] || Config.[:server_url], api_version: '0') end |