Add sensitive flag to openrc resource

Use to ensure that sensitive resource data is not logged by the chef-client.
Need to update Foodcritic to 4.0 to handle new sensitive attribute.

Change-Id: Ibc115969278f58e8baa01fb7f20303f88aa2ded5
Closes-Bug: #1365113
This commit is contained in:
Mark Vanderwiel 2014-09-03 14:14:17 -05:00
parent e47321b3c7
commit 87eb80fe47
4 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@ This file is used to list changes made in each version of cookbook-openstack-com
## 10.0.3
* Adding identity internal endpoint variables to support new endpoint usage in identity cookbook
* Add sensitive flag to openrc template resource
## 10.0.2
* Add database charset during create

View File

@ -6,6 +6,6 @@ gem 'berkshelf', '~> 3.1.5'
gem 'hashie', '~> 2.0'
gem 'chefspec', '~> 4.0.0'
gem 'rspec', '~> 3.0.0'
gem 'foodcritic', '~> 3.0.3'
gem 'foodcritic', '~> 4.0'
gem 'strainer'
gem 'rubocop', '~> 0.18.1'

View File

@ -54,6 +54,7 @@ template "#{node['openstack']['openrc']['path']}/#{node['openstack']['openrc']['
owner node['openstack']['openrc']['user']
group node['openstack']['openrc']['group']
mode node['openstack']['openrc']['file_mode']
sensitive true
variables(
user: ksadmin_user,
tenant: ksadmin_tenant_name,

View File

@ -23,6 +23,7 @@ describe 'openstack-common::openrc' do
recursive: true
)
expect(chef_run).to create_template(file.name).with(
sensitive: true,
user: 'root',
group: 'root',
mode: '0600'