Skip to content

Instantly share code, notes, and snippets.

@trilitheus
Last active August 29, 2015 14:02
Show Gist options
  • Save trilitheus/665164744a3df8d9b05c to your computer and use it in GitHub Desktop.
Save trilitheus/665164744a3df8d9b05c to your computer and use it in GitHub Desktop.
Wipe password attributes before report to chef server
chef_gem 'chef-vault'
require 'chef-vault'
secrets = ChefVault::Item.load('secrets', 'my_app')
node.override['my_app']['password'] = secrets['password']
###################
## Do your thang ##
###################
ruby_block 'wipe password' do
block do
node.force_override['my_app']['password'] = 'redacted'
end
action :create
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment