Skip to content

Commit 8d2f73b

Browse files
authored
Merge pull request #21 from Roblox/add_utilization_reporting_config
Add a variable for utilization reporting
2 parents bfbe395 + c92efcd commit 8d2f73b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

libraries/vault_config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class VaultConfig < Chef::Resource
6262
attribute(:storage_type, default: 'inmem', equal_to: %w(consul etcd zookeeper dynamodb s3 mysql postgresql inmem file raft))
6363
attribute(:storage_options, option_collector: true)
6464
attribute(:unauthenticated_metrics_access, equal_to:[true, false], default: false)
65+
attribute(:utilization_reporting, equal_to:[true, false], default: false)
6566
attribute(:hastorage_type, kind_of: String)
6667
attribute(:hastorage_options, option_collector: true)
6768
# Telemetry options
@@ -113,6 +114,7 @@ def to_json
113114
config['telemetry'] = telemetry_options unless telemetry_options.empty?
114115
# HA config
115116
ha_keeps = %i(api_addr cluster_addr disable_clustering)
117+
config['reporting'] = { 'license' => { 'enabled' => utilization_reporting } }
116118
config.merge!(to_hash.keep_if do |k, _|
117119
ha_keeps.include?(k.to_sym)
118120
end)

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
long_description 'Application cookbook for installing and configuring Vault.'
77
issues_url 'https://github.com/johnbellone/vault-cookbook/issues'
88
source_url 'https://github.com/johnbellone/vault-cookbook/'
9-
version '1002.7.7'
9+
version '1002.7.8'
1010

1111
supports 'ubuntu', '>= 12.04'
1212
supports 'redhat', '>= 6.4'

test/integration/default/inspec/default_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
it { should be_owned_by 'vault' }
1818
it { should be_grouped_into 'vault' }
1919
its('content') { should match /.*log_level.*/ }
20+
its('content') { should match /.*reporting.*/ }
2021
end
2122

2223
describe service('vault') do

0 commit comments

Comments
 (0)