diff --git a/.kitchen.yml b/.kitchen.yml index a0b42f41..30efce0c 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -12,6 +12,7 @@ verifier: name: inspec platforms: + - name: ubuntu-18.04 - name: ubuntu-16.04 - name: centos-7.2 diff --git a/attributes/default.rb b/attributes/default.rb index f6c6854e..aef3276a 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -12,7 +12,7 @@ default['hashicorp-vault']['service_user'] = 'vault' default['hashicorp-vault']['service_group'] = 'vault' -default['hashicorp-vault']['version'] = '1.3.4' +default['hashicorp-vault']['version'] = '1.6.1' default['hashicorp-vault']['archive_url_root'] = 'releases.hashicorp.com' diff --git a/libraries/vault_config.rb b/libraries/vault_config.rb index 015fb587..82e38632 100644 --- a/libraries/vault_config.rb +++ b/libraries/vault_config.rb @@ -53,7 +53,7 @@ class VaultConfig < Chef::Resource attribute(:default_lease_ttl, kind_of: String) attribute(:max_lease_ttl, kind_of: String) # Service Registration options - attribute(:service_registration_type, default: 'consul', equal_to: %w(consul kubernetes)) + attribute(:service_registration_type, equal_to: %w(consul kubernetes)) attribute(:service_registration_options, option_collector: true) # Storage options attribute(:storage_type, default: 'inmem', equal_to: %w(consul etcd zookeeper dynamodb s3 mysql postgresql inmem file raft)) @@ -95,7 +95,7 @@ def to_json end.merge(tls_disable: tls_disable.to_s) config['listener'] = { 'tcp' => listener_options } # service registration - config['service_registration'] = { service_registration_type => (service_registration_options || {}) } + config['service_registration'] = { service_registration_type => (service_registration_options || {}) } if service_registration_type # storage config['storage'] = { storage_type => (storage_options || {}) } # ha_storage, only some storages support HA diff --git a/test/integration/default/inspec/default_spec.rb b/test/integration/default/inspec/default_spec.rb index 66f99824..cc441de6 100644 --- a/test/integration/default/inspec/default_spec.rb +++ b/test/integration/default/inspec/default_spec.rb @@ -1,4 +1,4 @@ -describe file('/opt/vault/1.3.4/vault') do +describe file('/opt/vault/1.6.1/vault') do it { should be_file } it { should be_executable } end diff --git a/test/unit/recipes/default_spec.rb b/test/unit/recipes/default_spec.rb index a8793766..24827464 100644 --- a/test/unit/recipes/default_spec.rb +++ b/test/unit/recipes/default_spec.rb @@ -15,7 +15,7 @@ it { expect(chef_run).to create_poise_service_user('vault').with(group: 'vault') } it { expect(chef_run).to create_vault_config('/etc/vault/vault.json') } - it { expect(chef_run).to create_vault_installation('0.9.1') } + it { expect(chef_run).to create_vault_installation('1.6.1') } it { expect(chef_run).to enable_vault_service('vault').with(config_path: '/etc/vault/vault.json') } it { expect(chef_run).to start_vault_service('vault') } end