Top Level Namespace

Defined Under Namespace

Modules: Converter, CorePluginBaseHelper, CorePluginFunctionalHelper, CorePluginUnitHelper, DatabaseHelper, DeprecatedCloudResourcesList, EnumerableDelegation, FileReader, FilterTable, FindFiles, Inspec, InspecPlugins, Modulator, ObjectTraverser, PkeyReader, Secrets, SourceReaders, Supermarket, Waivers Classes: CommandWrapper, ErlangBitstream, ErlangConfigFile, ErlangParser, ErlangTransform, FilterArray, Hash, Module, NginxConfig, NginxParser, NginxTransform, PluginRegistry, ResourceInspector, SimpleConfig, Spdx

Constant Summary collapse

Compliance =

Backport old namespace

InspecPlugins::Compliance

Instance Method Summary collapse

Instance Method Details

#configure_licensing_config_for_kitchen(opts = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/inspec/utils/licensing_config.rb', line 11

def configure_licensing_config_for_kitchen(opts = {})
  ChefLicensing.configure do |config|
    # Reset entitlement ID to the ID of Chef Workstation
    config.chef_entitlement_id = "x6f3bc76-a94f-4b6c-bc97-4b7ed2b045c0"
    # Reset Chef License server via kitchen when passed in kitchen.yml
    opts["chef_license_server"] = opts["chef_license_server"].join(",") if opts["chef_license_server"].is_a? Array
    unless opts["chef_license_server"].nil? || opts["chef_license_server"].empty?
      ENV["CHEF_LICENSE_SERVER"] = opts["chef_license_server"]
    end
  end
  # Reset Chef License key via kitchen when passed in kitchen.yml
  ENV["CHEF_LICENSE_KEY"] = opts["chef_license_key"] if opts["chef_license_key"]
end