chef [SOLVED]: Chef: Vault Hashicorp ruby gem Home › Forums › Automation Tools › Chef Tutorials › chef [SOLVED]: Chef: Vault Hashicorp ruby gem Tagged: chef, hashicorp-vault, rubygems Viewing 2 posts - 1 through 2 (of 2 total) Author Posts October 15, 2017 at 1:10 am #201440 Cloudy PointKeymaster Question I’m trying to use the vault gem on my chef recipe. I’m importing it on my `metadata.rb gem vault Then on my recipe default.rb Vault.configure do |config| config.address = "http://127.0.0.1:8200" config.token = "token" end secret = Vault.logical.read("secret/stripe") stripe_key = secret.data[:api_key] But an error raises: uninitialized constant #<Class:#<Chef::Recipe:0x00000000036346a8>>::Vault 14>> Vault.configure do |config| What i’m missing? October 15, 2017 at 1:10 am #201441 Cloudy PointKeymaster Answer You will have to do require 'vault' on the top of your default.rb file. That way the Vault constant will be made available to your recipe. Source: https://stackoverflow.com/questions/46523835/chef-vault-hashicorp-ruby-gemAuthor: bitsapienThis work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic.