Skip to content

Commit

Permalink
Enabled setting chef license server also via env variable
Browse files Browse the repository at this point in the history
Signed-off-by: Nik08 <[email protected]>
  • Loading branch information
Nik08 committed Oct 1, 2024
1 parent 6775a63 commit 7dd9fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ For avoiding a single point of failure, it is possible to set up multiple local
- https://test-local-licensing-service-url-3
```

It could also be configured by setting environment variable `CHEF_LICENSE_SERVER` with the Licensing Service URL(s).

<!-- TODO Insert Link to right document -->
See the [Chef License documentation](/license/) for more information about Chef licensing.

Expand Down
5 changes: 2 additions & 3 deletions lib/kitchen/verifier/inspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ def call(state)
def setup_chef_license_config(opts, config)
# Pass chef_license_key to inspec if it is set
# Pass chef_license_server to inspec if it is set
chef_license_key = config[:chef_license_key] || ENV["CHEF_LICENSE_KEY"]
opts[:chef_license_key] = chef_license_key if chef_license_key
opts[:chef_license_server] = config[:chef_license_server] if config[:chef_license_server]
opts[:chef_license_key] = config[:chef_license_key] || ENV["CHEF_LICENSE_KEY"]
opts[:chef_license_server] = config[:chef_license_server] || ENV["CHEF_LICENSE_SERVER"]
end

def setup_waivers(opts, config)
Expand Down

0 comments on commit 7dd9fe7

Please sign in to comment.